mercurial/verify.py
changeset 6534 9b35a9f34675
parent 6211 f89fd07fc51d
child 6750 fb42030d79d6
--- a/mercurial/verify.py	Fri Apr 04 02:21:53 2008 +0300
+++ b/mercurial/verify.py	Mon Apr 14 22:31:33 2008 +0200
@@ -245,7 +245,14 @@
                 rp = fl.renamed(n)
                 if rp:
                     fl2 = repo.file(rp[0])
-                    rev = fl2.rev(rp[1])
+                    if fl2.count() == 0:
+                        err(flr, _("empty or missing copy source revlog %s:%s")
+                            % (rp[0], short(rp[1])), f)
+                    elif rp[1] == nullid:
+                        err(flr, _("copy source revision is nullid %s:%s")
+                            % (rp[0], short(rp[1])), f)
+                    else:
+                        rev = fl2.rev(rp[1])
             except KeyboardInterrupt:
                 repo.ui.warn(_("interrupted"))
                 raise