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

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