Mercurial > evolve
changeset 1213:7118996bdf43
config: enable all obsolete options
Upstream Mercurial has moved away from obsolete._enabled as the obsolete flag to
a series of options. This patch makes evolve enable all the options
automatically if the user hasn't enabled any already. This preserves the
existing evolve experience of not having to configure anything.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 17 Mar 2015 19:03:27 -0700 |
parents | 2c1b6e2ec59a |
children | 4b10e2c6f7e3 |
files | hgext/evolve.py |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Fri Mar 13 10:49:02 2015 -0700 +++ b/hgext/evolve.py Tue Mar 17 19:03:27 2015 -0700 @@ -327,6 +327,20 @@ reposetup = eh.final_reposetup ##################################################################### +### Option configuration ### +##################################################################### + +@eh.reposetup # must be the first of its kin. +def _configureoptions(ui, repo): + # If no capabilities are specified, enable everything. + # This is so existing evolve users don't need to change their config. + evolveopts = ui.configlist('experimental', 'evolution') + if not evolveopts: + evolveopts = ['all'] + ui.setconfig('experimental', 'evolution', evolveopts) + + +##################################################################### ### experimental behavior ### #####################################################################