Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Nov 2020 13:24:45 -0800] rev 45886
tests: make doctests not depend on str(ParseError()) format
`ParseError` implements `__bytes__`, but it doesn't implement
`__str__`, so it gets the default `__str__` implementation. The next
patch will make it so `ParseError` gets a `__str__` implementation,
which changes the format slightly. This prepares by making us not
depend on the format.
Differential Revision: https://phab.mercurial-scm.org/D9349
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Nov 2020 09:17:38 -0800] rev 45885
errors: format "abort: " text in a new Abort.format() method
This remove some duplication we had.
Differential Revision: https://phab.mercurial-scm.org/D9348
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Nov 2020 08:51:45 -0800] rev 45884
errors: make formatparse() an instance method on ParseError
It's just a little simpler this way.
Don't ask me what the "hg: " prefix signifies to the user, I just left
it as it was. I think we should consider changing the prefixes later
(maybe always use "abort: ", or maybe use more specific prefixes in
general).
Differential Revision: https://phab.mercurial-scm.org/D9347