##// END OF EJS Templates
context: handle censored data in an on-disk file context based on config...
Mike Edgar -
r22932:d8179287 default
parent child Browse files
Show More
@@ -930,7 +930,14 b' class filectx(basefilectx):'
930 filelog=self._filelog)
930 filelog=self._filelog)
931
931
932 def data(self):
932 def data(self):
933 try:
933 return self._filelog.read(self._filenode)
934 return self._filelog.read(self._filenode)
935 except error.CensoredNodeError:
936 if self._repo.ui.config("censor", "policy", "abort") == "ignore":
937 return ""
938 raise util.Abort(_("censored node: %s") % short(self._filenode),
939 hint="set censor.policy to ignore errors")
940
934 def size(self):
941 def size(self):
935 return self._filelog.size(self._filerev)
942 return self._filelog.size(self._filerev)
936
943
General Comments 0
You need to be logged in to leave comments. Login now