/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

Lines of Context:
20
20
 
21
21
 
22
22
import filecmp, os, shutil
23
 
from .walker import Walker
 
23
from walker import Walker
24
24
from stdhome import the
25
25
from stdhome import util
26
26
 
51
51
                # report changes
52
52
                if self.report and op == '*':
53
53
                        if dst == '_':
54
 
                                print(" N  %s" % ( rel_file ))
 
54
                                print " N  %s" % ( rel_file )
55
55
                        elif src == '_':
56
 
                                print(" D  %s" % ( rel_file ))
 
56
                                print " D  %s" % ( rel_file )
57
57
                        elif src == dst:
58
 
                                print(" M  %s" % ( rel_file ))
 
58
                                print " M  %s" % ( rel_file )
59
59
                        else:
60
 
                                print(" K  %s" % ( rel_file ))
 
60
                                print " K  %s" % ( rel_file )
61
61
 
62
62
 
63
63
        def process( self, rel_file, src, dst ):