/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-02-16 00:26:53 UTC
  • Revision ID: tim@ed.am-20160216002653-oa8dgponknyislg3
added home directory change reporting to CopyOutWalker; added --quiet option to
update, resolve, revert and init commands; replace use of re.match with
re.search for clarity (and fixed related bug in FileMatcher); added BzrVcs.run
command output when verbose >= 2

Show diffs side-by-side

added added

removed removed

21
21
 
22
22
import filecmp, os, shutil
23
23
from walker import Walker
24
 
from stdhome import the
25
 
from stdhome import util
 
24
import stdhome.the as the
26
25
 
27
26
 
28
27
class CopyBaseWalker( Walker ):
62
61
                        # if dst entity is a directory, copy permissions, as required (and
63
62
                        # recurse)
64
63
                        elif dst.type == 'd':
65
 
                                if os.stat( src.file ).st_mode != os.stat( dst.file ).st_mode:
66
 
                                        self.print_op( rel_file, 'd', '*', 'd' )
67
 
                                        shutil.copystat( src.file, dst.file )
68
 
                                else:
69
 
                                        self.print_op( rel_file, 'd', '=', 'd' )
 
64
                                # TODO: should check permission and only do as necessary
 
65
                                self.print_op( rel_file, 'd', '*', 'd' )
 
66
                                shutil.copystat( src.file, dst.file )
70
67
                                return True
71
68
 
72
69
                        # if dst entity is a symlink to a directory, and this is an