##// END OF EJS Templates
ui: add configoverride context manager...
ui: add configoverride context manager I feel like this idea might've been discussed before, so please feel free to point me to the right mailing list entry to read about why it should not be done. We have a common pattern of the following code: backup = ui.backupconfig(section, name) try: ui.setconfig(section, name, temporaryvalue, source) do_something() finally: ui.restoreconfig(backup) IMO, this looks better: with ui.configoverride({(section, name): temporaryvalue}, source): do_something() Especially this becomes more convenient when one has to backup multiple config values before doing something. In such case, adding a new value to backup requires codemod in three places.

File last commit:

r9999:f91e5630 default
r30480:b0a8337b default
Show More
changeset.tmpl
9 lines | 124 B | application/x-cheetah | CheetahLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 {header}
# HG changeset patch
# User {author}
# Date {date|hgdate}
# Node ID {node}
{parent%changesetparent}
{desc}
{diff}