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.
--- 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 ###
#####################################################################