changeset 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 a360ddc97719
children 06eb60f9a026
files utility_commands.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utility_commands.py
+++ b/utility_commands.py
@@ -72,7 +72,11 @@ def run_svn_info(ui, repo, hg_repo_path,
     svn_commit_hashes = dict(zip(hge.revmap.itervalues(),
                                  hge.revmap.iterkeys()))
     parent = find_wc_parent_rev(ui, repo, hge, svn_commit_hashes)
-    r, br = svn_commit_hashes[parent.node()]
+    pn = parent.node()
+    if pn not in svn_commit_hashes:
+        ui.status('Not a child of an svn revision.\n')
+        return 0
+    r, br = svn_commit_hashes[pn]
     subdir = parent.extra()['convert_revision'][40:].split('@')[0]
     if br == None:
         branchpath = '/trunk'