py3: avoid "%r" for list of byte strings, which produces b'' on py3
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 11 Jul 2019 21:48:37 -0700
changeset 4749 cdafbd01d0bf
parent 4748 d04be27dcce9
child 4750 d9d55e34943c
py3: avoid "%r" for list of byte strings, which produces b'' on py3
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Thu Jul 11 21:48:02 2019 -0700
+++ b/hgext3rd/evolve/__init__.py	Thu Jul 11 21:48:37 2019 -0700
@@ -429,8 +429,9 @@
             if not matchingevolvecommands:
                 raise error.Abort(_('unknown command: %s') % cmd)
             elif len(matchingevolvecommands) > 1:
-                msg = _('ambiguous command specification: "%s" matches %r')
-                raise error.Abort(msg % (cmd, matchingevolvecommands))
+                matchstr = ', '.join(matchingevolvecommands)
+                msg = _("ambiguous command specification: '%s' matches [%s]")
+                raise error.Abort(msg % (cmd, matchstr))
             else:
                 whitelist.add(matchingevolvecommands[0])
         for disabledcmd in set(cmdtable) - whitelist: