verify: fix length check
According to the document added above, we should check L1 == L2, and the
only way to get L1 in all cases is to call "rawsize()", and the only way to
get L2 is to call "revision(raw=True)". Therefore the fix.
Meanwhile there are still a lot of things about flagprocessor broken in
revlog.py. Tests will be added after revlog.py gets fixed.
--- a/mercurial/verify.py Wed Mar 29 14:45:01 2017 -0700
+++ b/mercurial/verify.py Wed Mar 29 14:49:14 2017 -0700
@@ -430,7 +430,8 @@
l = len(fl.read(n))
rp = fl.renamed(n)
if l != fl.size(i):
- if len(fl.revision(n)) != fl.size(i):
+ # the "L1 == L2" check
+ if len(fl.revision(n, raw=True)) != fl.rawsize(i):
self.err(lr, _("unpacked size is %s, %s expected") %
(l, fl.size(i)), f)
except error.CensoredNodeError: