##// END OF EJS Templates
registrar: host "dynamicdefault" constant by configitem object...
Yuya Nishihara -
r34918:ee924371 stable
parent child Browse files
Show More
@@ -301,7 +301,6 b' from mercurial.i18n import _'
301 from mercurial.node import short
301 from mercurial.node import short
302 from mercurial import (
302 from mercurial import (
303 cmdutil,
303 cmdutil,
304 configitems,
305 error,
304 error,
306 mail,
305 mail,
307 registrar,
306 registrar,
@@ -354,7 +353,7 b" configitem('bugzilla', 'host',"
354 default='localhost',
353 default='localhost',
355 )
354 )
356 configitem('bugzilla', 'notify',
355 configitem('bugzilla', 'notify',
357 default=configitems.dynamicdefault,
356 default=configitem.dynamicdefault,
358 )
357 )
359 configitem('bugzilla', 'password',
358 configitem('bugzilla', 'password',
360 default=None,
359 default=None,
@@ -190,7 +190,6 b' from mercurial.i18n import _'
190 from mercurial import (
190 from mercurial import (
191 bundle2,
191 bundle2,
192 cmdutil,
192 cmdutil,
193 configitems,
194 context,
193 context,
195 copies,
194 copies,
196 destutil,
195 destutil,
@@ -221,7 +220,7 b" configitem('experimental', 'histedit.aut"
221 default=False,
220 default=False,
222 )
221 )
223 configitem('histedit', 'defaultrev',
222 configitem('histedit', 'defaultrev',
224 default=configitems.dynamicdefault,
223 default=configitem.dynamicdefault,
225 )
224 )
226 configitem('histedit', 'dropmissing',
225 configitem('histedit', 'dropmissing',
227 default=False,
226 default=False,
@@ -107,7 +107,6 b' command.'
107 from __future__ import absolute_import
107 from __future__ import absolute_import
108
108
109 from mercurial import (
109 from mercurial import (
110 configitems,
111 hg,
110 hg,
112 localrepo,
111 localrepo,
113 registrar,
112 registrar,
@@ -131,7 +130,7 b' configtable = {}'
131 configitem = registrar.configitem(configtable)
130 configitem = registrar.configitem(configtable)
132
131
133 configitem('largefiles', 'minsize',
132 configitem('largefiles', 'minsize',
134 default=configitems.dynamicdefault,
133 default=configitem.dynamicdefault,
135 )
134 )
136 configitem('largefiles', 'patterns',
135 configitem('largefiles', 'patterns',
137 default=list,
136 default=list,
@@ -106,7 +106,10 b' dynamicdefault = object()'
106 # Registering actual config items
106 # Registering actual config items
107
107
108 def getitemregister(configtable):
108 def getitemregister(configtable):
109 return functools.partial(_register, configtable)
109 f = functools.partial(_register, configtable)
110 # export pseudo enum as configitem.*
111 f.dynamicdefault = dynamicdefault
112 return f
110
113
111 coreconfigitem = getitemregister(coreitems)
114 coreconfigitem = getitemregister(coreitems)
112
115
General Comments 0
You need to be logged in to leave comments. Login now