mercurial/commands.py
changeset 1313 1cc7c0cbc30b
parent 1312 c9cf171f30dd
child 1314 d37a46859acd
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -853,7 +853,10 @@ def debugstate(ui, repo):
 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"""