changeset 41062:0ecf58f7c2b2

largefiles: port configitems to exthelper It looks like dynamicdefault was referenced in a non-standard way.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 23 Dec 2018 16:16:13 -0500
parents c61b8dfb07c8
children 7250cbaabde0
files hgext/largefiles/__init__.py
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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):