py3: avoid "%r" for byte string, which produces b'' on py3
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 11 Jul 2019 21:48:02 -0700
changeset 4748 d04be27dcce9
parent 4747 fa6aafa2857d
child 4749 cdafbd01d0bf
py3: avoid "%r" for byte string, which produces b'' on py3 Replaced by "'%s'", which I think is clearer anyway.
hgext3rd/evolve/state.py
hgext3rd/topic/__init__.py
--- a/hgext3rd/evolve/state.py	Thu Jul 11 14:46:17 2019 -0700
+++ b/hgext3rd/evolve/state.py	Thu Jul 11 21:48:02 2019 -0700
@@ -136,7 +136,7 @@
             elif rtype.lower():
                 repo.ui.debug('ignore evolve state record type %s' % rtype)
             else:
-                raise error.Abort(_('unknown evolvestate field type %r')
+                raise error.Abort(_("unknown evolvestate field type '%s'")
                                   % rtype, hint=_('upgrade your evolve'))
         return state
     finally:
--- a/hgext3rd/topic/__init__.py	Thu Jul 11 14:46:17 2019 -0700
+++ b/hgext3rd/topic/__init__.py	Thu Jul 11 21:48:02 2019 -0700
@@ -546,7 +546,7 @@
                 csetcount = stack.stack(repo, topic=ct).changesetcount
                 empty = csetcount == 0
                 if empty and not ctwasempty:
-                    ui.status('active topic %r is now empty\n' % ct)
+                    ui.status("active topic '%s' is now empty\n" % ct)
                     trnames = getattr(tr, 'names', getattr(tr, '_names', ()))
                     if ('phase' in trnames
                             or any(n.startswith('push-response')
@@ -555,10 +555,10 @@
                 hint = _("(see 'hg help topics' for more information)\n")
                 if ctwasempty and not empty:
                     if csetcount == 1:
-                        msg = _('active topic %r grew its first changeset\n%s')
+                        msg = _("active topic '%s' grew its first changeset\n%s")
                         ui.status(msg % (ct, hint))
                     else:
-                        msg = _('active topic %r grew its %s first changesets\n%s')
+                        msg = _("active topic '%s' grew its %s first changesets\n%s")
                         ui.status(msg % (ct, csetcount, hint))
 
             tr.addpostclose('signalcurrenttopicempty', currenttopicempty)