Patchwork D12361: hg: always import hgdemandimport

login
register
mail settings
Submitter phabricator
Date March 10, 2022, 1:07 a.m.
Message ID <differential-rev-PHID-DREV-3mkogntd2o3pac4tr4ti-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50703/
State New
Headers show

Comments

phabricator - March 10, 2022, 1:07 a.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The deleted if condition is always true now that we dropped Python 2
  and 3.5.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hg

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hg b/hg
--- a/hg
+++ b/hg
@@ -43,10 +43,9 @@ 
 with tracing.log('hg script'):
     # enable importing on demand to reduce startup time
     try:
-        if sys.version_info[0] < 3 or sys.version_info >= (3, 6):
-            import hgdemandimport
+        import hgdemandimport
 
-            hgdemandimport.enable()
+        hgdemandimport.enable()
     except ImportError:
         sys.stderr.write(
             "abort: couldn't find mercurial libraries in [%s]\n"