mercurial/commands.py
changeset 1313 1cc7c0cbc30b
parent 1312 c9cf171f30dd
child 1314 d37a46859acd
equal deleted inserted replaced
1312:c9cf171f30dd 1313:1cc7c0cbc30b
   851         ui.write("copy: %s -> %s\n" % (repo.dirstate.copies[f], f))
   851         ui.write("copy: %s -> %s\n" % (repo.dirstate.copies[f], f))
   852 
   852 
   853 def debugdata(ui, file_, rev):
   853 def debugdata(ui, file_, rev):
   854     """dump the contents of an data file revision"""
   854     """dump the contents of an data file revision"""
   855     r = revlog.revlog(file, file_[:-2] + ".i", file_)
   855     r = revlog.revlog(file, file_[:-2] + ".i", file_)
   856     ui.write(r.revision(r.lookup(rev)))
   856     try:
       
   857         ui.write(r.revision(r.lookup(rev)))
       
   858     except KeyError:
       
   859         raise util.Abort('invalid revision identifier %s', rev)
   857 
   860 
   858 def debugindex(ui, file_):
   861 def debugindex(ui, file_):
   859     """dump the contents of an index file"""
   862     """dump the contents of an index file"""
   860     r = revlog.revlog(file, file_, "")
   863     r = revlog.revlog(file, file_, "")
   861     ui.write("   rev    offset  length   base linkrev" +
   864     ui.write("   rev    offset  length   base linkrev" +