D1980: narrow: remove old version-checking logic and declare internal

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Feb 1 23:06:27 UTC 2018


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

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/narrow/__init__.py

CHANGE DETAILS

diff --git a/hgext/narrow/__init__.py b/hgext/narrow/__init__.py
--- a/hgext/narrow/__init__.py
+++ b/hgext/narrow/__init__.py
@@ -8,16 +8,11 @@
 
 from __future__ import absolute_import
 
-from mercurial import __version__
-if __version__.version < '3.7':
-    raise ImportError(
-        'narrowhg requires mercurial 3.7 or newer')
-
-try:
-    from .__versionnum__ import version
-    __version__ = version
-except ImportError:
-    pass
+# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
+# extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
+# be specifying the version(s) of Mercurial they are tested with, or
+# leave the attribute unspecified.
+testedwith = 'ships-with-hg-core'
 
 from mercurial import (
     extensions,



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


More information about the Mercurial-devel mailing list