Mercurial > evolve
comparison hgext/evolve.py @ 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 |
comparison
equal
deleted
inserted
replaced
1212:2c1b6e2ec59a | 1213:7118996bdf43 |
---|---|
323 | 323 |
324 eh = exthelper() | 324 eh = exthelper() |
325 uisetup = eh.final_uisetup | 325 uisetup = eh.final_uisetup |
326 extsetup = eh.final_extsetup | 326 extsetup = eh.final_extsetup |
327 reposetup = eh.final_reposetup | 327 reposetup = eh.final_reposetup |
328 | |
329 ##################################################################### | |
330 ### Option configuration ### | |
331 ##################################################################### | |
332 | |
333 @eh.reposetup # must be the first of its kin. | |
334 def _configureoptions(ui, repo): | |
335 # If no capabilities are specified, enable everything. | |
336 # This is so existing evolve users don't need to change their config. | |
337 evolveopts = ui.configlist('experimental', 'evolution') | |
338 if not evolveopts: | |
339 evolveopts = ['all'] | |
340 ui.setconfig('experimental', 'evolution', evolveopts) | |
341 | |
328 | 342 |
329 ##################################################################### | 343 ##################################################################### |
330 ### experimental behavior ### | 344 ### experimental behavior ### |
331 ##################################################################### | 345 ##################################################################### |
332 | 346 |