/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/walker/copy_base.py

  • Committer: Tim Marston
  • Date: 2016-12-13 21:40:34 UTC
  • Revision ID: tim@ed.am-20161213214034-nd5t7ztnlrjd627i
fix add command and generic filename expansion/resolution to expend to
homedir-relative filename and absolute filename based on original filename, as
specified, rather than a fully, symlink-resolved filename.  So, e.g., if ~/bob
was a symlink to ~/fred, then ~/bob/a would resolve to the relative filename
bob/a, becuase it is inside the homedir (it would resolve to fred/a otherwise)

Show diffs side-by-side

added added

removed removed

31
31
        both of which are specialisations of this purpose.  See them for more
32
32
        information.  The report method, which can be overridden in derived classes,
33
33
        takes, in addition to the relative filename, a source file type, an
34
 
        operation, and a sestination file type.  Valid file types are f (file), l
 
34
        operation, and a destination file type.  Valid file types are f (file), l
35
35
        (symlink), d (directory) and _ (non-existant).  Valid operations are *
36
36
        (modify), = (skip: same), @ (skip: symlink substitute) and # (skip:
37
37
        ignored).
49
49
        def print_op( self, rel_file, src, op, dst ):
50
50
 
51
51
                # report changes
52
 
                if self.report and the.verbose < 2 and op == '*':
 
52
                if self.report and op == '*':
53
53
                        if dst == '_':
54
54
                                print " N  %s" % ( rel_file )
55
55
                        elif src == '_':