/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/repo.py

  • Committer: Tim Marston
  • Date: 2014-09-09 19:13:33 UTC
  • Revision ID: tim@ed.am-20140909191333-0b7hrzonxce8mgy3
attempt to allow arguments before main command by treating the first thing that
doesn't look like an option as the command

Show diffs side-by-side

added added

removed removed

21
21
 
22
22
import os
23
23
import the, util
24
 
from vcs.bzr import VcsBzr
 
24
from vcs.bzr import BzrVcs
25
25
 
26
26
 
27
27
class Repo:
31
31
                self.name = name
32
32
                self.dir = os.path.join( the.dir, self.name )
33
33
                self.full_dir = util.canonicalise_path( self.dir )
34
 
                self.vcs = VcsBzr( self.full_dir )
 
34
                self.vcs = BzrVcs( self.full_dir )
35
35
 
36
36
 
37
37
        def check_dir_exists( self, should_exist = True ):
39
39
                if os.path.exists( self.full_dir ) != should_exist:
40
40
                        raise the.program.FatalError(
41
41
                                'repository %s exists: %s' % ( condition, self.dir ) )
 
42
 
 
43
        def __str__( self ):
 
44
                return "Repo( %s: %s )" % ( self.name, self.dir )