Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
45391:e58e234096de | 45392:77b8588dd84e |
---|---|
44 patch, | 44 patch, |
45 pathutil, | 45 pathutil, |
46 phases, | 46 phases, |
47 pycompat, | 47 pycompat, |
48 repair, | 48 repair, |
49 requirements, | |
49 revlog, | 50 revlog, |
50 rewriteutil, | 51 rewriteutil, |
51 scmutil, | 52 scmutil, |
52 smartset, | 53 smartset, |
53 state as statemod, | 54 state as statemod, |
55 templatekw, | 56 templatekw, |
56 templater, | 57 templater, |
57 util, | 58 util, |
58 vfs as vfsmod, | 59 vfs as vfsmod, |
59 ) | 60 ) |
60 | |
61 from .interfaces import repository | |
62 | 61 |
63 from .utils import ( | 62 from .utils import ( |
64 dateutil, | 63 dateutil, |
65 stringutil, | 64 stringutil, |
66 ) | 65 ) |
1358 r = None | 1357 r = None |
1359 if repo: | 1358 if repo: |
1360 if cl: | 1359 if cl: |
1361 r = repo.unfiltered().changelog | 1360 r = repo.unfiltered().changelog |
1362 elif dir: | 1361 elif dir: |
1363 if repository.TREEMANIFEST_REQUIREMENT not in repo.requirements: | 1362 if requirements.TREEMANIFEST_REQUIREMENT not in repo.requirements: |
1364 raise error.Abort( | 1363 raise error.Abort( |
1365 _( | 1364 _( |
1366 b"--dir can only be used on repos with " | 1365 b"--dir can only be used on repos with " |
1367 b"treemanifest enabled" | 1366 b"treemanifest enabled" |
1368 ) | 1367 ) |