comparison python/setup_repo.py @ 459:32667483d1c5

python/setup_repo.py
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 10 Aug 2013 18:11:44 -0700
parents 483b4237d9a2
children 3cd5996c1329
comparison
equal deleted inserted replaced
458:483b4237d9a2 459:32667483d1c5
31 if isinstance(command, string): 31 if isinstance(command, string):
32 command_str = command 32 command_str = command
33 else: 33 else:
34 command_str = ' '.join(command) 34 command_str = ' '.join(command)
35 print 'Running:\n%s' % (command_str) 35 print 'Running:\n%s' % (command_str)
36 if globals()['dry_run']:
37 return
36 return subprocess.check_output(*args, **kwargs) 38 return subprocess.check_output(*args, **kwargs)
37 39
38 def init_repo(directory): 40 def init_repo(directory):
39 """setup repository""" 41 """setup repository"""
40 call(['hg', 'init', directory]) 42 call(['hg', 'init', directory])