Mercurial > hg-stable
diff mercurial/configitems.py @ 34917:ee9243715c59 stable
registrar: host "dynamicdefault" constant by configitem object
This is the common pattern seen in the other registrar classes.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 21 Oct 2017 13:13:20 +0900 |
parents | 346781c41597 |
children | 37450a122128 |
line wrap: on
line diff
--- a/mercurial/configitems.py Sat Oct 21 13:04:58 2017 +0900 +++ b/mercurial/configitems.py Sat Oct 21 13:13:20 2017 +0900 @@ -106,7 +106,10 @@ # Registering actual config items def getitemregister(configtable): - return functools.partial(_register, configtable) + f = functools.partial(_register, configtable) + # export pseudo enum as configitem.* + f.dynamicdefault = dynamicdefault + return f coreconfigitem = getitemregister(coreitems)