Patchwork D2636: scmutil: fix oversight in b76248e51605c6 where I forgot to use msg

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 4:38 p.m.
Message ID <ea6c15104ac627b5f65b0be3ce2a9d5f@localhost.localdomain>
Download mbox | patch
Permalink /patch/28926/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2018, 4:38 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc442c4a92ae8: scmutil: fix oversight in b76248e51605c6 where I forgot to use msg (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2636?vs=6542&id=6551

REVISION DETAIL
  https://phab.mercurial-scm.org/D2636

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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: