configitems: register the 'largefiles.patterns' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 13 Oct 2017 22:26:58 +0200
changeset 34756 3f3c6d12095d
parent 34755 66adbe3c1046
child 34757 8cf0a6cd1ed2
configitems: register the 'largefiles.patterns' config
hgext/largefiles/__init__.py
hgext/largefiles/lfcommands.py
hgext/largefiles/overrides.py
--- a/hgext/largefiles/__init__.py	Fri Oct 13 22:26:03 2017 +0200
+++ b/hgext/largefiles/__init__.py	Fri Oct 13 22:26:58 2017 +0200
@@ -133,6 +133,9 @@
 configitem('largefiles', 'minsize',
     default=configitems.dynamicdefault,
 )
+configitem('largefiles', 'patterns',
+    default=list,
+)
 reposetup = reposetup.reposetup
 
 def featuresetup(ui, supported):
--- a/hgext/largefiles/lfcommands.py	Fri Oct 13 22:26:03 2017 +0200
+++ b/hgext/largefiles/lfcommands.py	Fri Oct 13 22:26:58 2017 +0200
@@ -109,7 +109,7 @@
             lfiles = set()
             normalfiles = set()
             if not pats:
-                pats = ui.configlist(lfutil.longname, 'patterns', default=[])
+                pats = ui.configlist(lfutil.longname, 'patterns')
             if pats:
                 matcher = matchmod.match(rsrc.root, '', list(pats))
             else:
--- a/hgext/largefiles/overrides.py	Fri Oct 13 22:26:03 2017 +0200
+++ b/hgext/largefiles/overrides.py	Fri Oct 13 22:26:58 2017 +0200
@@ -111,7 +111,7 @@
 
     lfmatcher = None
     if lfutil.islfilesrepo(repo):
-        lfpats = ui.configlist(lfutil.longname, 'patterns', default=[])
+        lfpats = ui.configlist(lfutil.longname, 'patterns')
         if lfpats:
             lfmatcher = matchmod.match(repo.root, '', list(lfpats))