Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 45392: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 | e58e234096de |
children | 8c466bcb0879 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Aug 08 15:48:17 2020 +0530 +++ b/mercurial/cmdutil.py Sat Aug 08 16:24:12 2020 +0530 @@ -46,6 +46,7 @@ phases, pycompat, repair, + requirements, revlog, rewriteutil, scmutil, @@ -58,8 +59,6 @@ vfs as vfsmod, ) -from .interfaces import repository - from .utils import ( dateutil, stringutil, @@ -1360,7 +1359,7 @@ if cl: r = repo.unfiltered().changelog elif dir: - if repository.TREEMANIFEST_REQUIREMENT not in repo.requirements: + if requirements.TREEMANIFEST_REQUIREMENT not in repo.requirements: raise error.Abort( _( b"--dir can only be used on repos with "