comparison python/setup_repo.py @ 458:483b4237d9a2

python/setup_repo.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 18:10:16 -0700
parents cdad4c445993
children 32667483d1c5
comparison
equal deleted inserted replaced
457:cdad4c445993 458:483b4237d9a2
21 from optparse import OptionParser 21 from optparse import OptionParser
22 22
23 string = (basestring,) 23 string = (basestring,)
24 24
25 # global variables that probably shouldn't be 25 # global variables that probably shouldn't be
26 dry_run = True 26 dry_run = True # XXX instead, should have runner class
27 verbose = True 27 verbose = True
28 28
29 def call(command, *args, **kwargs): 29 def call(command, *args, **kwargs):
30 30
31 if isinstance(command, string): 31 if isinstance(command, string):
120 args = [os.getcwd()] 120 args = [os.getcwd()]
121 if len(args) != 1: 121 if len(args) != 1:
122 parser.print_usage() 122 parser.print_usage()
123 parser.exit() 123 parser.exit()
124 directory = args[0] 124 directory = args[0]
125 globals()['dry_run'] = options.dry_run
125 126
126 # initialize repository 127 # initialize repository
127 if options.remote_only: 128 if options.remote_only:
128 assert options.remote_url 129 assert options.remote_url
129 else: 130 else: