diff mercurial/wireproto.py @ 37122:d4a2e0d5d042

procutil: bulk-replace util.std* to point to new module
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Mar 2018 15:09:33 +0900
parents f0b6fbea00cf
children d5d665f6615a
line wrap: on
line diff
--- a/mercurial/wireproto.py	Sat Mar 24 13:38:04 2018 +0900
+++ b/mercurial/wireproto.py	Sat Mar 24 15:09:33 2018 +0900
@@ -35,6 +35,7 @@
 )
 
 from .utils import (
+    procutil,
     stringutil,
 )
 
@@ -519,8 +520,8 @@
             opts[k] = others[k]
             del others[k]
     if others:
-        util.stderr.write("warning: %s ignored unexpected arguments %s\n"
-                          % (cmd, ",".join(others)))
+        procutil.stderr.write("warning: %s ignored unexpected arguments %s\n"
+                              % (cmd, ",".join(others)))
     return opts
 
 def bundle1allowed(repo, action):
@@ -1081,14 +1082,14 @@
                 try:
                     raise
                 except error.Abort:
-                    # The old code we moved used util.stderr directly.
+                    # The old code we moved used procutil.stderr directly.
                     # We did not change it to minimise code change.
                     # This need to be moved to something proper.
                     # Feel free to do it.
-                    util.stderr.write("abort: %s\n" % exc)
+                    procutil.stderr.write("abort: %s\n" % exc)
                     if exc.hint is not None:
-                        util.stderr.write("(%s)\n" % exc.hint)
-                    util.stderr.flush()
+                        procutil.stderr.write("(%s)\n" % exc.hint)
+                    procutil.stderr.flush()
                     return pushres(0, output.getvalue() if output else '')
                 except error.PushRaced:
                     return pusherr(pycompat.bytestr(exc),