[PATCH] verify: don't check for /dev/null files in delta

Martin von Zweigbergk martinvonz at google.com
Fri Mar 27 13:36:14 CDT 2015

# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1427479422 25200
#      Fri Mar 27 11:03:42 2015 -0700
# Node ID 7714ea5cbb8270c7fcacb0014cb5d13304818178
# Parent  95cbc77c0cad04b04bd690bb3ba91e919e11d3b1
verify: don't check for /dev/null files in delta

The manifest delta is generated from the revlog delta, which never
contains /dev/null, so remove the unnecessary check.

This check was introduced as early as 66fb61d9d97d (Use revlog.delta
and mdiff.patchtext to massively speed up processing, 2005-05-20), but
I couldn't figure out if it was needed even then.

diff -r 95cbc77c0cad -r 7714ea5cbb82 mercurial/verify.py
--- a/mercurial/verify.py	Wed Mar 25 15:53:30 2015 -0700
+++ b/mercurial/verify.py	Fri Mar 27 11:03:42 2015 -0700
@@ -169,7 +169,7 @@
             for f, fn in mf.readdelta(n).iteritems():
                 if not f:
                     err(lr, _("file without name in manifest"))
-                elif f != "/dev/null":
+                else:
                     filenodes.setdefault(_normpath(f), {}).setdefault(fn, lr)
         except Exception, inst:
             exc(lr, _("reading manifest delta %s") % short(n), inst)

More information about the Mercurial-devel mailing list