Comments
Patch
@@ -260,13 +260,19 @@
del filenodes[f][n]
# verify contents
+ fc = repo.filectx(f, changeid=lr, fileid=n)
try:
- l = len(fl.read(n))
- rp = fl.renamed(n)
- if l != fl.size(i):
- if len(fl.revision(n)) != fl.size(i):
+ l = len(fc.data())
+ rp = fc.renamed()
+ if l != fc.size():
+ if len(fl.revision(n)) != fc.size():
err(lr, _("unpacked size is %s, %s expected") %
- (l, fl.size(i)), f)
+ (l, fc.size()), f)
+ except revlog.CensoredNodeError:
+ if fc.censorallowed():
+ warn(_("warning: node %s censored from %s") % (short(n), f))
+ else:
+ err(lr, _("node %s censored from %s") % (short(n), f))
except Exception, inst:
exc(lr, _("unpacking %s") % short(n), inst, f)