D3958: Allow to run setup.py with python 3 without a mercurial checkout
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Jul 16 20:48:54 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd5b31ae9cc0a: Allow to run setup.py with python 3 without a mercurial checkout (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3958?vs=9614&id=9615
REVISION DETAIL
https://phab.mercurial-scm.org/D3958
AFFECTED FILES
setup.py
CHANGE DETAILS
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@
badpython = True
# Allow Python 3 from source checkouts.
- if os.path.isdir('.hg'):
+ if os.path.isdir('.hg') or 'HGPYTHON3' in os.environ:
badpython = False
if badpython:
@@ -369,7 +369,7 @@
from mercurial import __version__
version = __version__.version
except ImportError:
- version = 'unknown'
+ version = b'unknown'
finally:
if oldpolicy is None:
del os.environ['HGMODULEPOLICY']
To: glandium, indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list