diff mercurial/wireprotov1server.py @ 45885:600aec73f309

errors: format "abort: " text in a new Abort.format() method This remove some duplication we had. Differential Revision: https://phab.mercurial-scm.org/D9348
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 20 Nov 2020 09:17:38 -0800
parents 80f32ec8653a
children 89a2afe31e82
line wrap: on
line diff
--- a/mercurial/wireprotov1server.py	Fri Nov 20 08:51:45 2020 -0800
+++ b/mercurial/wireprotov1server.py	Fri Nov 20 09:17:38 2020 -0800
@@ -685,9 +685,7 @@
                     # We did not change it to minimise code change.
                     # This need to be moved to something proper.
                     # Feel free to do it.
-                    procutil.stderr.write(b"abort: %s\n" % exc.message)
-                    if exc.hint is not None:
-                        procutil.stderr.write(b"(%s)\n" % exc.hint)
+                    procutil.stderr.write(exc.format())
                     procutil.stderr.flush()
                     return wireprototypes.pushres(
                         0, output.getvalue() if output else b''