mercurial/verify.py
changeset 8291 f5c1a9094e41
parent 8225 46293a0c7e9f
child 8292 29540554def8
--- a/mercurial/verify.py	Sun Apr 19 20:02:32 2009 +0200
+++ b/mercurial/verify.py	Fri Apr 24 10:44:39 2009 +0200
@@ -173,7 +173,17 @@
 
     files = sorted(set(filenodes) | set(filelinkrevs))
     for f in files:
-        lr = filelinkrevs[f][0]
+        try:
+            linkrevs = filelinkrevs[f]
+        except KeyError:
+            # in manifest but not in changelog
+            linkrevs = []
+
+        if linkrevs:
+            lr = linkrevs[0]
+        else:
+            lr = None
+
         try:
             fl = repo.file(f)
         except error.RevlogError, e:
@@ -191,7 +201,7 @@
         for i in fl:
             revisions += 1
             n = fl.node(i)
-            lr = checkentry(fl, i, n, seen, filelinkrevs.get(f, []), f)
+            lr = checkentry(fl, i, n, seen, linkrevs, f)
             if f in filenodes:
                 if havemf and n not in filenodes[f]:
                     err(lr, _("%s not in manifests") % (short(n)), f)