changeset 36695:c442c4a92ae8

scmutil: fix oversight in b76248e51605c6 where I forgot to use msg Thanks to Yuya for spotting my mistake. Differential Revision: https://phab.mercurial-scm.org/D2636
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 10:20:41 -0500
parents 1d06407d0ee9
children 0c431d3129c4
files mercurial/scmutil.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Sun Mar 04 10:23:07 2018 -0500
+++ b/mercurial/scmutil.py	Sun Mar 04 10:20:41 2018 -0500
@@ -189,12 +189,12 @@
         msg = inst.args[1]
         if isinstance(msg, type(u'')):
             msg = pycompat.sysbytes(msg)
-        elif not isinstance(inst.args[1], bytes):
-            ui.warn(" %r\n" % (inst.args[1],))
-        elif not inst.args[1]:
+        if not isinstance(msg, bytes):
+            ui.warn(" %r\n" % (msg,))
+        elif not msg:
             ui.warn(_(" empty string\n"))
         else:
-            ui.warn("\n%r\n" % util.ellipsis(inst.args[1]))
+            ui.warn("\n%r\n" % util.ellipsis(msg))
     except error.CensoredNodeError as inst:
         ui.warn(_("abort: file censored %s!\n") % inst)
     except error.RevlogError as inst: