/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/vcs/bzr.py

  • Committer: Tim Marston
  • Date: 2016-05-22 16:45:54 UTC
  • Revision ID: tim@ed.am-20160522164554-n5qhuibvnv0z4tk1
added general reporting to CopyBase and configured it via copy-in and copy-out
walkers (it is required in copy in, during add command); added -R (recursive)
flass to add command; allow vcs backends to augment statically ignored files
list; added detection of out of date working copy to bzr backend;
generate_walk_list() now takes a mandatory directory as the first argument;
don't copy entire subtree during copy of missing directory (as this makes
assumptions about what's in the walk-list)

Show diffs side-by-side

added added

removed removed

36
36
                """
37
37
 
38
38
                self.dir = dir
 
39
                self.ignored_files = [ '.bzr', '.bzrignore' ]
39
40
 
40
41
 
41
42
        def has_authority( self ):
286
287
                """
287
288
 
288
289
                # bzr commit
289
 
                self.run( [ 'bzr', 'commit', '-m', '' ] )
 
290
                try:
 
291
                        self.run( [ 'bzr', 'commit', '-m', '' ] )
 
292
                except self.VcsError as e:
 
293
                        if re.search( '/Working tree is out of date, please/', e.output ):
 
294
                                raise the.program.FatalError(
 
295
                                        'you must update your files first.\n' +
 
296
                                        'Hint: see "%s update --help"' % the.program.name );
290
297
 
291
298
 
292
299
        def run( self, cmd ):