configitems: register 'ui.clonebundleprefers' as example for 'configlist'
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 17 Jun 2017 13:25:42 +0200
changeset 32991 03608e8d09e9
parent 32990 1d5d7e2b7ab5
child 32992 816a4fa7d5f8
configitems: register 'ui.clonebundleprefers' as example for 'configlist' This exercise the default value handling in 'configlist'.
mercurial/configitems.py
mercurial/exchange.py
--- a/mercurial/configitems.py	Sat Jun 17 13:17:10 2017 +0200
+++ b/mercurial/configitems.py	Sat Jun 17 13:25:42 2017 +0200
@@ -39,6 +39,9 @@
 coreconfigitem('patch', 'fuzz',
     default=2,
 )
+coreconfigitem('ui', 'clonebundleprefers',
+    default=[],
+)
 coreconfigitem('ui', 'quiet',
     default=False,
 )
--- a/mercurial/exchange.py	Sat Jun 17 13:17:10 2017 +0200
+++ b/mercurial/exchange.py	Sat Jun 17 13:25:42 2017 +0200
@@ -1980,7 +1980,7 @@
         return self._cmp(other) != 0
 
 def sortclonebundleentries(ui, entries):
-    prefers = ui.configlist('ui', 'clonebundleprefers', default=[])
+    prefers = ui.configlist('ui', 'clonebundleprefers')
     if not prefers:
         return list(entries)