Skip to content
Snippets Groups Projects
Commit e2d386b8 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

narrow: use featuresetupfuncs

This is the preferred way to register repo requirements that can be
opened because it respects the set of loaded extensions at repo open
time.

Differential Revision: https://phab.mercurial-scm.org/D2926
parent ecac0006
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,8 @@
# Export the commands table for Mercurial to see.
cmdtable = narrowcommands.table
localrepo.localrepository._basesupported.add(changegroup.NARROW_REQUIREMENT)
def featuresetup(ui, features):
features.add(changegroup.NARROW_REQUIREMENT)
def uisetup(ui):
"""Wraps user-facing mercurial commands with narrow-aware versions."""
......@@ -60,6 +61,7 @@
def uisetup(ui):
"""Wraps user-facing mercurial commands with narrow-aware versions."""
localrepo.featuresetupfuncs.add(featuresetup)
narrowrevlog.setup()
narrowbundle2.setup()
narrowmerge.setup()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment