D3709: py3: replace unicode with type(u'')

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Jun 10 10:33:11 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  unicode is not present on Python 3 and throws NameError because default strings
  on py3 are unicodes.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/win32mbcs.py

CHANGE DETAILS

diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py
--- a/hgext/win32mbcs.py
+++ b/hgext/win32mbcs.py
@@ -127,7 +127,7 @@
                          " %s encoding\n") % (_encoding))
 
 def wrapper(func, args, kwds):
-    return basewrapper(func, unicode, encode, decode, args, kwds)
+    return basewrapper(func, type(u''), encode, decode, args, kwds)
 
 
 def reversewrapper(func, args, kwds):



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


More information about the Mercurial-devel mailing list