Mercurial > hgsubversion
changeset 212:a421aca2b0f5
info: produce canonical URLs more of the time.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 17 Mar 2009 15:11:03 -0500 |
parents | 05243ec295e1 |
children | b1d2ea765516 2165461d2dd8 761b095c11fb |
files | utility_commands.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utility_commands.py +++ b/utility_commands.py @@ -73,8 +73,12 @@ def run_svn_info(ui, repo, hg_repo_path, hge.revmap.iterkeys())) parent = find_wc_parent_rev(ui, repo, hge, svn_commit_hashes) r, br = svn_commit_hashes[parent.node()] + subdir = parent.extra()['convert_revision'][40:].split('@')[0] if br == None: branchpath = '/trunk' + elif br.startswith('../'): + branchpath = '/%s' % br[3:] + subdir = subdir.replace('branches/../', '') else: branchpath = '/branches/%s' % br url = hge.url @@ -83,7 +87,6 @@ def run_svn_info(ui, repo, hg_repo_path, url = '%s%s' % (url, branchpath) author = '@'.join(parent.user().split('@')[:-1]) # cleverly figure out repo root w/o actually contacting the server - subdir = parent.extra()['convert_revision'][40:].split('@')[0] reporoot = url[:len(url)-len(subdir)] ui.status('''URL: %(url)s Repository Root: %(reporoot)s