D4537: localrepo: add requirement when narrow files creation option present
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Sep 12 13:02:30 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG261f1e8dc300: localrepo: add requirement when narrow files creation option present (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4537?vs=10914&id=10927
REVISION DETAIL
https://phab.mercurial-scm.org/D4537
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2440,6 +2440,9 @@
if ui.configbool('format', 'internal-phase'):
requirements.add('internal-phase')
+ if createopts.get('narrowfiles'):
+ requirements.add(repository.NARROW_REQUIREMENT)
+
return requirements
def filterknowncreateopts(ui, createopts):
@@ -2456,7 +2459,9 @@
Extensions can wrap this function to filter out creation options
they know how to handle.
"""
- return dict(createopts)
+ known = {'narrowfiles'}
+
+ return {k: v for k, v in createopts.items() if k not in known}
def createrepository(ui, wdirvfs, createopts=None):
"""Create a new repository in a vfs.
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list