diff mercurial/chgserver.py @ 45884:98399dd1b96c

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 20 Nov 2020 08:51:45 -0800
parents 4b4160a83303
children 600aec73f309
line wrap: on
line diff
--- a/mercurial/chgserver.py	Thu Nov 19 11:23:59 2020 -0800
+++ b/mercurial/chgserver.py	Fri Nov 20 08:51:45 2020 -0800
@@ -62,7 +62,6 @@
     extensions,
     node,
     pycompat,
-    scmutil,
     util,
 )
 
@@ -508,7 +507,7 @@
         try:
             self.ui, lui = _loadnewui(self.ui, args, self.cdebug)
         except error.ParseError as inst:
-            scmutil.formatparse(self.ui.warn, inst)
+            self.ui.warn(inst.format())
             self.ui.flush()
             self.cresult.write(b'exit 255')
             return