Mercurial > hg > config
changeset 449:f39d37973d4b
python/setup_repo.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 15:52:22 -0700 |
parents | 056befdec66c |
children | 56fa913491a1 |
files | python/setup_repo.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/python/setup_repo.py Sat Aug 10 15:19:39 2013 -0700 +++ b/python/setup_repo.py Sat Aug 10 15:52:22 2013 -0700 @@ -82,14 +82,18 @@ help="setup remote server only") options, args = parser.parse_args(args) + # sanitization + if not args: + args = [os.getcwd()] + if len(args) != 1: + parser.print_usage() + parser.exit() + directory = args[0] + # initialize repository if options.remote_only: assert options.remote_url else: - if len(args) != 1: - parser.print_usage() - parser.exit() - directory = args[0] init_repo(directory) # setup remote, if specified