[PATCH 2 of 5] py3: replace str(None) with literal in convcmd.py
Yuya Nishihara
yuya at tcha.org
Wed Sep 27 12:34:39 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1506506903 -32400
# Wed Sep 27 19:08:23 2017 +0900
# Node ID 40669eaa31e2c2371481fc50f7ed725b17063f6e
# Parent b27593faa8b3d4ddcf71dcb323ae8189691929df
py3: replace str(None) with literal in convcmd.py
diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -87,7 +87,7 @@ def mapbranch(branch, branchmap):
# At some point we used "None" literal to denote the default branch,
# attempt to use that for backward compatibility.
if (not branch):
- branch = branchmap.get(str(None), branch)
+ branch = branchmap.get('None', branch)
return branch
source_converters = [
diff --git a/tests/test-doctest.py b/tests/test-doctest.py
--- a/tests/test-doctest.py
+++ b/tests/test-doctest.py
@@ -71,7 +71,7 @@ testmod('mercurial.ui')
testmod('mercurial.url')
testmod('mercurial.util', py3=False) # py3: multiple bytes/unicode issues
testmod('mercurial.util', testtarget='platform')
-testmod('hgext.convert.convcmd', py3=False) # py3: use of str() ?
+testmod('hgext.convert.convcmd')
testmod('hgext.convert.cvsps')
testmod('hgext.convert.filemap')
testmod('hgext.convert.p4')
More information about the Mercurial-devel
mailing list