Mercurial > hg
diff hgext/largefiles/__init__.py @ 41061:98681293c890
largefiles: port commands to exthelper
One subtle change here is that the purge, rebase and transplant extensions are
wrapped in extsetup() instead of uisetup().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 23 Dec 2018 17:26:25 -0500 |
parents | 0ecf58f7c2b2 |
children | 0a7f582f6f1f |
line wrap: on
line diff
--- a/hgext/largefiles/__init__.py Sun Dec 23 21:54:56 2018 -0500 +++ b/hgext/largefiles/__init__.py Sun Dec 23 17:26:25 2018 -0500 @@ -128,6 +128,8 @@ testedwith = 'ships-with-hg-core' eh = exthelper.exthelper() +eh.merge(lfcommands.eh) +eh.merge(overrides.eh) eh.configitem('largefiles', 'minsize', default=configitems.dynamicdefault, @@ -139,17 +141,20 @@ default=None, ) +cmdtable = eh.cmdtable configtable = eh.configtable +extsetup = eh.finalextsetup reposetup = reposetup.reposetup +uisetup = eh.finaluisetup def featuresetup(ui, supported): # don't die on seeing a repo with the largefiles requirement supported |= {'largefiles'} -def uisetup(ui): +@eh.uisetup +def _uisetup(ui): localrepo.featuresetupfuncs.add(featuresetup) hg.wirepeersetupfuncs.append(proto.wirereposetup) uisetupmod.uisetup(ui) -cmdtable = lfcommands.cmdtable revsetpredicate = overrides.revsetpredicate