largefiles: use "ui.configlist()" to get largefiles.patterns configuration stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 24 Nov 2011 17:54:50 +0900
branchstable
changeset 15579 6c5e6ebe0812
parent 15565 3992c7df85f2
child 15582 3da1f60fc80d
largefiles: use "ui.configlist()" to get largefiles.patterns configuration current lfconvert implementation uses combination of "ui.config()" and "str.split(' ')" to get largefiles.patterns configuration. but it can not handle multiline configuration in hgrc files correctly. lfconvert should use "ui.configlist()" instead of it, as same as override_add does.
hgext/largefiles/lfcommands.py
tests/test-lfconvert.t
--- a/hgext/largefiles/lfcommands.py	Wed Nov 23 16:25:44 2011 -0600
+++ b/hgext/largefiles/lfcommands.py	Thu Nov 24 17:54:50 2011 +0900
@@ -71,9 +71,7 @@
             lfiles = set()
             normalfiles = set()
             if not pats:
-                pats = ui.config(lfutil.longname, 'patterns', default=())
-                if pats:
-                    pats = pats.split(' ')
+                pats = ui.configlist(lfutil.longname, 'patterns', default=[])
             if pats:
                 matcher = match_.match(rsrc.root, '', list(pats))
             else:
--- a/tests/test-lfconvert.t	Wed Nov 23 16:25:44 2011 -0600
+++ b/tests/test-lfconvert.t	Thu Nov 24 17:54:50 2011 +0900
@@ -5,7 +5,8 @@
   > graphlog =
   > [largefiles]
   > minsize = 0.5
-  > patterns = **.dat
+  > patterns = **.other
+  >     **.dat
   > EOF
 
 "lfconvert" works