[PATCH 10 of 15 RFC] verify: check only files related to target revisions at partial verification

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Wed Oct 3 11:39:07 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1349281445 -32400
# Node ID c65f1bffe4bf01bdb672691a2390be0c2164bf8a
# Parent  6998d864458102fef37e9c247e728f023738fcd7
verify: check only files related to target revisions at partial verification

This patch puts only nodes of filelogs related to verification target
revisions into "filenodes" at partial verification, to verify only
filelogs changed in verification target revisions.

diff -r 6998d8644581 -r c65f1bffe4bf mercurial/verify.py
--- a/mercurial/verify.py	Thu Oct 04 01:24:05 2012 +0900
+++ b/mercurial/verify.py	Thu Oct 04 01:24:05 2012 +0900
@@ -154,6 +154,14 @@
             exc(i, _("unpacking changeset %s") % short(n), inst)
     ui.progress(_('checking'), None)
 
+    if partially:
+        def putfilenode(f, fn, lr):
+            if f in filelinkrevs and lr in filelinkrevs[f]:
+                filenodes.setdefault(f, {}).setdefault(fn, lr)
+    else:
+        def putfilenode(f, fn, lr):
+            filenodes.setdefault(f, {}).setdefault(fn, lr)
+
     ui.status(_("checking manifests\n"))
     seen = {}
     if refersmf:
@@ -177,7 +185,7 @@
                 if not f:
                     err(lr, _("file without name in manifest"))
                 elif f != "/dev/null":
-                    filenodes.setdefault(f, {}).setdefault(fn, lr)
+                    putfilenode(f, fn, lr)
         except Exception, inst:
             exc(lr, _("reading manifest delta %s") % short(n), inst)
     ui.progress(_('checking'), None)


More information about the Mercurial-devel mailing list