Mercurial > hgsubversion
comparison utility_commands.py @ 219:794f473b9b49
info: stop failing if the rev is not a child of an svn rev.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Sat, 28 Mar 2009 17:38:48 -0500 |
| parents | a421aca2b0f5 |
| children | f71af18c4379 |
comparison
equal
deleted
inserted
replaced
| 218:a360ddc97719 | 219:794f473b9b49 |
|---|---|
| 70 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, | 70 hge = hg_delta_editor.HgChangeReceiver(hg_repo_path, |
| 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 pn = parent.node() |
| 76 if pn not in svn_commit_hashes: | |
| 77 ui.status('Not a child of an svn revision.\n') | |
| 78 return 0 | |
| 79 r, br = svn_commit_hashes[pn] | |
| 76 subdir = parent.extra()['convert_revision'][40:].split('@')[0] | 80 subdir = parent.extra()['convert_revision'][40:].split('@')[0] |
| 77 if br == None: | 81 if br == None: |
| 78 branchpath = '/trunk' | 82 branchpath = '/trunk' |
| 79 elif br.startswith('../'): | 83 elif br.startswith('../'): |
| 80 branchpath = '/%s' % br[3:] | 84 branchpath = '/%s' % br[3:] |
