# HG changeset patch # User Gregory Szorc # Date 2019-03-02 20:57:00 # Node ID 7f63ec6969f3f6380ce760d8d06ae0f9f3422744 # Parent 89f01ea906ae6471c18caaa08739f88cf19823e6 global: use raw strings for namedtuple() Otherwise Python 2 will attempt to coerce unicode to str, which we don't want. Differential Revision: https://phab.mercurial-scm.org/D6049 diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -194,8 +194,8 @@ def unsharejournal(orig, ui, repo, repop return orig(ui, repo, repopath) class journalentry(collections.namedtuple( - u'journalentry', - u'timestamp user command namespace name oldhashes newhashes')): + r'journalentry', + r'timestamp user command namespace name oldhashes newhashes')): """Individual journal entry * timestamp: a mercurial (time, timezone) tuple diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -3211,9 +3211,9 @@ def finddirs(path): SERVERROLE = 'server' CLIENTROLE = 'client' -compewireprotosupport = collections.namedtuple(u'compenginewireprotosupport', - (u'name', u'serverpriority', - u'clientpriority')) +compewireprotosupport = collections.namedtuple(r'compenginewireprotosupport', + (r'name', r'serverpriority', + r'clientpriority')) class compressormanager(object): """Holds registrations of various compression engines.