/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-23 22:37:03 UTC
  • Revision ID: tim@ed.am-20160223223703-sx94svvstwt8xvrb
determine and instantiate repo vcs dynamically; for new repos, added default vcs
configuration option and allow override in init command arguments; re-added
handling of -v/--verbose arguments to commands and removed from program (since
there may be problems parsing all arguments here)

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