comparison mercurial/dispatch.py @ 22595:244478687edd

error: add CensoredNodeError, will be thrown when content deliberately erased This change introduces the error plus a corresponding catch in dispatch, to provide localized error messages. The verb "censor" is used in this commit and all following to refer to erasing the content of a revlog revision (filelog, for now) without recalculating node IDs, leaving that revision invalid. Further work must be done to safely share such revision data with compliant clients. I find the analogy to censorship straightforward; for less politically charged options, consider "erase", "excise", "expunge", or "blackhole".
author Mike Edgar <adgar@google.com>
date Wed, 03 Sep 2014 15:59:03 -0400
parents c828b61e0635
children 41c03b7592ed
comparison
equal deleted inserted replaced
22594:1257cc6c1a2f 22595:244478687edd
191 ui.warn(" %r\n" % (inst.args[1],)) 191 ui.warn(" %r\n" % (inst.args[1],))
192 elif not inst.args[1]: 192 elif not inst.args[1]:
193 ui.warn(_(" empty string\n")) 193 ui.warn(_(" empty string\n"))
194 else: 194 else:
195 ui.warn("\n%r\n" % util.ellipsis(inst.args[1])) 195 ui.warn("\n%r\n" % util.ellipsis(inst.args[1]))
196 except error.CensoredNodeError, inst:
197 ui.warn(_("abort: file censored %s!\n") % inst)
196 except error.RevlogError, inst: 198 except error.RevlogError, inst:
197 ui.warn(_("abort: %s!\n") % inst) 199 ui.warn(_("abort: %s!\n") % inst)
198 except error.SignalInterrupt: 200 except error.SignalInterrupt:
199 ui.warn(_("killed!\n")) 201 ui.warn(_("killed!\n"))
200 except error.UnknownCommand, inst: 202 except error.UnknownCommand, inst: