[Updated] [+ ] D10512: bzr: only support bzr conversion on Python3

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Thu Jun 3 08:44:10 UTC 2021


Alphare updated this revision to Diff 28427.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10512?vs=27161&id=28427

BRANCH
  stable

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10512/new/

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -29,7 +29,8 @@
 stdout = getattr(sys.stdout, 'buffer', sys.stdout)
 stderr = getattr(sys.stderr, 'buffer', sys.stderr)
 
-if sys.version_info[0] >= 3:
+is_not_python2 = sys.version_info[0] >= 3
+if is_not_python2:
 
     def _sys2bytes(p):
         if p is None:
@@ -169,6 +170,8 @@
 
 @check("bzr", "Canonical's Bazaar client")
 def has_bzr():
+    if not is_not_python2:
+        return False
     try:
         import bzrlib
         import bzrlib.bzrdir



To: Alphare, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210603/c673be2b/attachment.html>


More information about the Mercurial-patches mailing list