Mercurial > hg > config
comparison python/setup_repo.py @ 455:81a237bcf3b6
python/setup_repo.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 17:57:48 -0700 |
parents | f7c49c61f092 |
children | 7f1dfb36a0fe |
comparison
equal
deleted
inserted
replaced
454:f7c49c61f092 | 455:81a237bcf3b6 |
---|---|
50 - push : protocol for push | 50 - push : protocol for push |
51 - remote_path : remote path of hg repository links; otherwise taken from --remote-url, if specified | 51 - remote_path : remote path of hg repository links; otherwise taken from --remote-url, if specified |
52 """ | 52 """ |
53 | 53 |
54 # parse remote URL | 54 # parse remote URL |
55 host, netloc, path, query, anchor = urlparse.urlsplit(remote_url) | 55 scheme, netloc, path, query, anchor = urlparse.urlsplit(remote_url) |
56 path = path.rstrip('/') | 56 path = path.rstrip('/') |
57 host = netloc # -> host, port, etc | |
57 | 58 |
58 # derive name | 59 # derive name |
59 if name is None: | 60 if name is None: |
60 if '/' in path: | 61 if '/' in path: |
61 prefix, name = path.rsplit('/', 1) | 62 prefix, name = path.rsplit('/', 1) |