/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/command/init.py

  • Committer: Tim Marston
  • Date: 2014-04-04 22:33:09 UTC
  • Revision ID: tim@ed.am-20140404223309-macifjzkiryg982n
read ~/.stdhomerc; commands set repo before run(); program performs late
initialisation of some variables; updated help

Show diffs side-by-side

added added

removed removed

29
29
class InitCommand( Command ):
30
30
 
31
31
 
32
 
        def __init__( self ):
33
 
                self.repo = None
34
 
 
35
 
 
36
32
        def print_help( self ):
37
33
                print "Usage: " + the.program.name + " init [URL] [--repo=REPO]"
38
34
                print
61
57
                                if not re.match( '^[-a-zA-z0-9.]+$', optarg ):
62
58
                                        raise the.program.FatalError(
63
59
                                                'invalid repository name: ' + optarg )
64
 
                                self.repo = optarg
 
60
                                the.repo = optarg
65
61
                        elif opt in [ '--verbose', '-v' ]:
66
62
                                the.verbose += 1
67
63
                        elif opt == "--help":
81
77
        def run( self ):
82
78
 
83
79
                # set up repo and check it *doesn't* already exists
84
 
                the.set_repo( self.repo )
85
80
                the.repo.check_dir_exists( False )
86
81
 
87
82
                # ensure our top-level directory exists