hgext/narrow/__init__.py
changeset 38835 a232e6744ba3
parent 38128 1cba497491be
child 38872 576eef1ab43d
--- a/hgext/narrow/__init__.py	Fri Aug 03 12:35:23 2018 -0700
+++ b/hgext/narrow/__init__.py	Fri Aug 03 11:02:34 2018 -0700
@@ -15,11 +15,11 @@
 testedwith = 'ships-with-hg-core'
 
 from mercurial import (
-    changegroup,
     extensions,
     hg,
     localrepo,
     registrar,
+    repository,
     verify as verifymod,
 )
 
@@ -55,7 +55,7 @@
 cmdtable = narrowcommands.table
 
 def featuresetup(ui, features):
-    features.add(changegroup.NARROW_REQUIREMENT)
+    features.add(repository.NARROW_REQUIREMENT)
 
 def uisetup(ui):
     """Wraps user-facing mercurial commands with narrow-aware versions."""
@@ -71,7 +71,7 @@
     if not repo.local():
         return
 
-    if changegroup.NARROW_REQUIREMENT in repo.requirements:
+    if repository.NARROW_REQUIREMENT in repo.requirements:
         narrowrepo.wraprepo(repo)
         narrowcopies.setup(repo)
         narrowpatch.setup(repo)