verify: report censored nodes if configured policy is abort
authorMike Edgar <adgar@google.com>
Tue, 14 Oct 2014 16:16:04 -0400
changeset 22933 3a60cd44e619
parent 22932 d81792872984
child 22934 8a096d4d0862
verify: report censored nodes if configured policy is abort
mercurial/verify.py
--- a/mercurial/verify.py	Tue Oct 14 15:46:16 2014 -0400
+++ b/mercurial/verify.py	Tue Oct 14 16:16:04 2014 -0400
@@ -267,6 +267,9 @@
                     if len(fl.revision(n)) != fl.size(i):
                         err(lr, _("unpacked size is %s, %s expected") %
                             (l, fl.size(i)), f)
+            except error.CensoredNodeError:
+                if ui.config("censor", "policy", "abort") == "abort":
+                    err(lr, _("censored file data"), f)
             except Exception, inst:
                 exc(lr, _("unpacking %s") % short(n), inst, f)