largefiles: port configitems to exthelper
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 23 Dec 2018 16:16:13 -0500
changeset 41059 0ecf58f7c2b2
parent 41058 c61b8dfb07c8
child 41060 7250cbaabde0
largefiles: port configitems to exthelper It looks like dynamicdefault was referenced in a non-standard way.
hgext/largefiles/__init__.py
--- a/hgext/largefiles/__init__.py	Sun Dec 23 15:18:38 2018 -0500
+++ b/hgext/largefiles/__init__.py	Sun Dec 23 16:16:13 2018 -0500
@@ -107,9 +107,10 @@
 from __future__ import absolute_import
 
 from mercurial import (
+    configitems,
+    exthelper,
     hg,
     localrepo,
-    registrar,
 )
 
 from . import (
@@ -126,19 +127,19 @@
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
-configtable = {}
-configitem = registrar.configitem(configtable)
+eh = exthelper.exthelper()
 
-configitem('largefiles', 'minsize',
-    default=configitem.dynamicdefault,
+eh.configitem('largefiles', 'minsize',
+    default=configitems.dynamicdefault,
 )
-configitem('largefiles', 'patterns',
+eh.configitem('largefiles', 'patterns',
     default=list,
 )
-configitem('largefiles', 'usercache',
+eh.configitem('largefiles', 'usercache',
     default=None,
 )
 
+configtable = eh.configtable
 reposetup = reposetup.reposetup
 
 def featuresetup(ui, supported):