/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-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

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', e.output ):
 
294
                                raise the.program.FatalError(
 
295
                                        'you must update your files first.\n' +
 
296
                                        'Hint: see "%s update --help"' % the.program.name );
 
297
                        else:
 
298
                                raise e
290
299
 
291
300
 
292
301
        def run( self, cmd ):