Mercurial > hg
diff hgext/narrow/narrowbundle2.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 | d99083996398 |
children | a2f521773761 |
line wrap: on
line diff
--- a/hgext/narrow/narrowbundle2.py Fri Aug 03 12:35:23 2018 -0700 +++ b/hgext/narrow/narrowbundle2.py Fri Aug 03 11:02:34 2018 -0700 @@ -23,6 +23,7 @@ extensions, narrowspec, repair, + repository, util, wireprototypes, ) @@ -174,8 +175,8 @@ def _handlechangespec_2(op, inpart): includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines()) excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines()) - if not changegroup.NARROW_REQUIREMENT in op.repo.requirements: - op.repo.requirements.add(changegroup.NARROW_REQUIREMENT) + if not repository.NARROW_REQUIREMENT in op.repo.requirements: + op.repo.requirements.add(repository.NARROW_REQUIREMENT) op.repo._writerequirements() op.repo.setnarrowpats(includepats, excludepats)