Submitter | Pulkit Goyal |
---|---|
Date | April 7, 2017, 10:59 a.m. |
Message ID | <beedb62e62a78a2f45ef.1491562779@pulkit-goyal> |
Download | mbox | patch |
Permalink | /patch/19997/ |
State | Accepted |
Headers | show |
Comments
On Fri, 07 Apr 2017 16:29:39 +0530, Pulkit Goyal wrote: > # HG changeset patch > # User Pulkit Goyal <7895pulkit@gmail.com> > # Date 1491560884 -19800 > # Fri Apr 07 15:58:04 2017 +0530 > # Node ID beedb62e62a78a2f45ef8bd0b72c51f14619ee7f > # Parent c08552f3a4ab883aac255bc7d8efb7637ba245d8 > py3: alias unicode to str on Python 3 > > diff -r c08552f3a4ab -r beedb62e62a7 mercurial/scmutil.py > --- a/mercurial/scmutil.py Fri Apr 07 13:46:35 2017 +0530 > +++ b/mercurial/scmutil.py Fri Apr 07 15:58:04 2017 +0530 > @@ -36,6 +36,9 @@ > > termsize = scmplatform.termsize > > +if pycompat.ispy3: > + unicode = str Let's add pycompat.unicode and/or importer magic. We'll need the unicode type at several places.
Patch
diff -r c08552f3a4ab -r beedb62e62a7 mercurial/scmutil.py --- a/mercurial/scmutil.py Fri Apr 07 13:46:35 2017 +0530 +++ b/mercurial/scmutil.py Fri Apr 07 15:58:04 2017 +0530 @@ -36,6 +36,9 @@ termsize = scmplatform.termsize +if pycompat.ispy3: + unicode = str + class status(tuple): '''Named tuple with a list of files per status. The 'deleted', 'unknown' and 'ignored' properties are only relevant to the working copy.