Mercurial > hgsubversion
comparison utility_commands.py @ 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 | 91db8fc049b0 |
children | 794f473b9b49 bb2b78f9f4ce |
comparison
equal
deleted
inserted
replaced
211:05243ec295e1 | 212:a421aca2b0f5 |
---|---|
71 ui_=ui) | 71 ui_=ui) |
72 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), | 72 svn_commit_hashes = dict(zip(hge.revmap.itervalues(), |
73 hge.revmap.iterkeys())) | 73 hge.revmap.iterkeys())) |
74 parent = find_wc_parent_rev(ui, repo, hge, svn_commit_hashes) | 74 parent = find_wc_parent_rev(ui, repo, hge, svn_commit_hashes) |
75 r, br = svn_commit_hashes[parent.node()] | 75 r, br = svn_commit_hashes[parent.node()] |
76 subdir = parent.extra()['convert_revision'][40:].split('@')[0] | |
76 if br == None: | 77 if br == None: |
77 branchpath = '/trunk' | 78 branchpath = '/trunk' |
79 elif br.startswith('../'): | |
80 branchpath = '/%s' % br[3:] | |
81 subdir = subdir.replace('branches/../', '') | |
78 else: | 82 else: |
79 branchpath = '/branches/%s' % br | 83 branchpath = '/branches/%s' % br |
80 url = hge.url | 84 url = hge.url |
81 if url[-1] == '/': | 85 if url[-1] == '/': |
82 url = url[:-1] | 86 url = url[:-1] |
83 url = '%s%s' % (url, branchpath) | 87 url = '%s%s' % (url, branchpath) |
84 author = '@'.join(parent.user().split('@')[:-1]) | 88 author = '@'.join(parent.user().split('@')[:-1]) |
85 # cleverly figure out repo root w/o actually contacting the server | 89 # cleverly figure out repo root w/o actually contacting the server |
86 subdir = parent.extra()['convert_revision'][40:].split('@')[0] | |
87 reporoot = url[:len(url)-len(subdir)] | 90 reporoot = url[:len(url)-len(subdir)] |
88 ui.status('''URL: %(url)s | 91 ui.status('''URL: %(url)s |
89 Repository Root: %(reporoot)s | 92 Repository Root: %(reporoot)s |
90 Repository UUID: %(uuid)s | 93 Repository UUID: %(uuid)s |
91 Revision: %(revision)s | 94 Revision: %(revision)s |