Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 45371:e58e234096de
repository: introduce constant for treemanifest requirement and use it
In future we will like to much cleaner logic around which requirement is for
working copy and which can go in store. To start with that, we first need to
de-clutter the requirement values spread around and replace them with constants.
Differential Revision: https://phab.mercurial-scm.org/D8916
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 08 Aug 2020 15:48:17 +0530 |
parents | 8cce9f77ca73 |
children | 77b8588dd84e |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jul 21 22:13:54 2020 +0200 +++ b/mercurial/cmdutil.py Sat Aug 08 15:48:17 2020 +0530 @@ -58,6 +58,8 @@ vfs as vfsmod, ) +from .interfaces import repository + from .utils import ( dateutil, stringutil, @@ -1358,7 +1360,7 @@ if cl: r = repo.unfiltered().changelog elif dir: - if b'treemanifest' not in repo.requirements: + if repository.TREEMANIFEST_REQUIREMENT not in repo.requirements: raise error.Abort( _( b"--dir can only be used on repos with "