Mercurial > hg > config
changeset 457:cdad4c445993
python/setup_repo.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 18:07:02 -0700 |
parents | 7f1dfb36a0fe |
children | 483b4237d9a2 |
files | python/setup_repo.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/python/setup_repo.py Sat Aug 10 18:01:26 2013 -0700 +++ b/python/setup_repo.py Sat Aug 10 18:07:02 2013 -0700 @@ -22,6 +22,10 @@ string = (basestring,) +# global variables that probably shouldn't be +dry_run = True +verbose = True + def call(command, *args, **kwargs): if isinstance(command, string): @@ -46,7 +50,8 @@ """ path = os.path.join(directory, '.hg', 'hgrc') - # TODO: use ConfigParser + # TODO: use ConfigParser and i.e + # http://k0s.org/hg/config/file/95afeaf9c42d/python/hgrc.py with file(os.path.join(directory, '.hg', 'hgrc'), 'w') as f: print >> f, HGRC % { 'host': host, 'repo': repo, 'name': name} @@ -105,6 +110,9 @@ parser.add_option('-o', '--remote-only', dest='remote_only', action='store_true', default=False, help="setup remote server only") + parser.add_option('--dry-run', dest='dry_run', + action='store_true', default=True, + help="") options, args = parser.parse_args(args) # sanitization