Mercurial > hg
diff hgext/narrow/__init__.py @ 38835:a232e6744ba3
narrow: move requirement constant from changegroup to repository
As suggested by Gregory Szorc.
Differential Revision: https://phab.mercurial-scm.org/D4094
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 03 Aug 2018 11:02:34 -0700 |
parents | 1cba497491be |
children | 576eef1ab43d |
line wrap: on
line diff
--- 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)