/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-04-10 20:29:46 UTC
  • Revision ID: tim@ed.am-20160410202946-9eoh5i3et9443aq6
fixed greps in tools/dev to detect home-dir lines in stdhomerc

Show diffs side-by-side

added added

removed removed

38
38
                self.dir = dir
39
39
 
40
40
 
 
41
        def has_authority( self ):
 
42
                """Check that the directory is under this VCS's control.
 
43
                """
 
44
 
 
45
                return os.path.exists( os.path.join( self.dir, '.bzr' ) )
 
46
 
 
47
 
 
48
        def expand_repo_url( self, url ):
 
49
                """Convert a simple hostname in to an URL that the VCS can use.
 
50
                """
 
51
 
 
52
                return 'bzr+ssh://%s/%s/%s' % ( url, the.dir, the.repo.name )
 
53
 
 
54
 
41
55
        def init( self ):
42
56
                """Create a new, empty branch
43
57
                """
283
297
                if p.returncode > 0:
284
298
                        raise self.VcsError( ' '.join( cmd[ : 2 ] ), output )
285
299
                if the.verbose >= 2:
286
 
                        print re.sub( '(^|\n)', '\\1  > ', output.rstrip() )
 
300
                        verbose_output = output.rstrip()
 
301
                        if len( verbose_output ):
 
302
                                print re.sub( '(^|\n)', '\\1  : ', verbose_output )
287
303
                return output
288
304
 
289
305