PATCH: fix traceback on "hg debugdata"

Anupam Kapoor anupam.kapoor at
Wed Sep 21 08:59:03 CDT 2005


this patch fixes the traceback while doing "hg debugdata" with an
invalid revision number.

kind regards

# HG changeset patch
# User Anupam Kapoor<anupam.kapoor at>
# Node ID f2c0797c7afed60178d5021599fdab1de3ea086c
# Parent  1546c2aa6b309b631669aeeca6b97e8adc2feb7c
Fix traceback during invalid rev identifier for debugdata

diff -r 1546c2aa6b30 -r f2c0797c7afe mercurial/
--- a/mercurial/     Wed Sep 21 04:35:51 2005
+++ b/mercurial/     Wed Sep 21 13:44:37 2005
@@ -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"""

More information about the Mercurial mailing list