changeset 22933:3a60cd44e619

verify: report censored nodes if configured policy is abort
author Mike Edgar <adgar@google.com>
date Tue, 14 Oct 2014 16:16:04 -0400
parents d81792872984
children 8a096d4d0862
files mercurial/verify.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)