changeset 1313:1cc7c0cbc30b

Fix traceback during invalid rev identifier for debugdata
author Anupam Kapoor<anupam.kapoor@gmail.com>
date Thu, 22 Sep 2005 09:42:15 -0700
parents c9cf171f30dd
children d37a46859acd
files mercurial/commands.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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"""