# HG changeset patch # User Anupam Kapoor # Date 1127407335 25200 # Node ID 1cc7c0cbc30b39b224334416279a2e71546c6d7b # Parent c9cf171f30dddd83e79d917cfc4e643b5be3105a Fix traceback during invalid rev identifier for debugdata diff --git a/mercurial/commands.py b/mercurial/commands.py --- 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"""