/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-03-09 01:56:01 UTC
  • Revision ID: tim@ed.am-20140309015601-ptqyjqrngb7i6dmj
changed use of python

Show diffs side-by-side

added added

removed removed

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