Mercurial > hg
diff mercurial/sparse.py @ 45372:77b8588dd84e
requirements: introduce new requirements related module
It was not clear where all requirements should and related APIs should be, this
patch introduces a requirements module which will have all exitsing requirements
and related APIs.
Differential Revision: https://phab.mercurial-scm.org/D8917
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 08 Aug 2020 16:24:12 +0530 |
parents | a1f51c7dce0f |
children | 14b3dbfa4eeb |
line wrap: on
line diff
--- a/mercurial/sparse.py Sat Aug 08 15:48:17 2020 +0530 +++ b/mercurial/sparse.py Sat Aug 08 16:24:12 2020 +0530 @@ -21,10 +21,10 @@ mergestate as mergestatemod, pathutil, pycompat, + requirements, scmutil, util, ) -from .interfaces import repository from .utils import hashutil @@ -608,11 +608,11 @@ # updated. But this requires massive rework to matcher() and its # consumers. - if repository.SPARSE_REQUIREMENT in oldrequires and removing: - repo.requirements.discard(repository.SPARSE_REQUIREMENT) + if requirements.SPARSE_REQUIREMENT in oldrequires and removing: + repo.requirements.discard(requirements.SPARSE_REQUIREMENT) scmutil.writereporequirements(repo) - elif repository.SPARSE_REQUIREMENT not in oldrequires: - repo.requirements.add(repository.SPARSE_REQUIREMENT) + elif requirements.SPARSE_REQUIREMENT not in oldrequires: + repo.requirements.add(requirements.SPARSE_REQUIREMENT) scmutil.writereporequirements(repo) try: