Fix traceback during invalid rev identifier for debugdata
authorAnupam Kapoor<anupam.kapoor@gmail.com>
Thu, 22 Sep 2005 09:42:15 -0700
changeset 1313 1cc7c0cbc30b
parent 1312 c9cf171f30dd
child 1314 d37a46859acd
Fix traceback during invalid rev identifier for debugdata
mercurial/commands.py
--- a/mercurial/commands.py	Thu Sep 22 09:41:34 2005 -0700
+++ b/mercurial/commands.py	Thu Sep 22 09:42:15 2005 -0700
@@ -853,7 +853,10 @@
 def debugdata(ui, file_, rev):
     """dump the contents of an data file revision"""
     r = revlog.revlog(file, file_[:-2] + ".i", file_)
-    ui.write(r.revision(r.lookup(rev)))
+    try:
+        ui.write(r.revision(r.lookup(rev)))
+    except KeyError:
+        raise util.Abort('invalid revision identifier %s', rev)
 
 def debugindex(ui, file_):
     """dump the contents of an index file"""