hgext/narrow/__init__.py
changeset 36464 3f0af89e008d
parent 36091 ea02be8665ef
child 36466 a8b4d7673d8e
--- a/hgext/narrow/__init__.py	Wed Feb 21 14:36:42 2018 +0530
+++ b/hgext/narrow/__init__.py	Wed Feb 28 10:21:43 2018 -0800
@@ -15,6 +15,7 @@
 testedwith = 'ships-with-hg-core'
 
 from mercurial import (
+    changegroup,
     extensions,
     hg,
     localrepo,
@@ -55,7 +56,7 @@
 # Export the commands table for Mercurial to see.
 cmdtable = narrowcommands.table
 
-localrepo.localrepository._basesupported.add(narrowrepo.REQUIREMENT)
+localrepo.localrepository._basesupported.add(changegroup.NARROW_REQUIREMENT)
 
 def uisetup(ui):
     """Wraps user-facing mercurial commands with narrow-aware versions."""
@@ -71,7 +72,7 @@
     if not isinstance(repo, localrepo.localrepository):
         return
 
-    if narrowrepo.REQUIREMENT in repo.requirements:
+    if changegroup.NARROW_REQUIREMENT in repo.requirements:
         narrowrepo.wraprepo(repo, True)
         narrowcopies.setup(repo)
         narrowdirstate.setup(repo)