[PATCH 1 of 3] demandimport: define an importnow context manager
Jordi GutiƩrrez Hermoso
jordigh at octave.org
Thu May 28 09:32:17 CDT 2015
On Wed, 2015-05-27 at 11:42 -0700, Pierre-Yves David wrote:
> Some black magic idea:
>
> with demandimport.disable():
>
> disable() both disable debug and return a context manager object
> able to restore previous value on __exit__
That's a bit too magical for my taste. But it gives me an idea. This
looks great:
with demandimport.disabled():
I'll do that instead.
More information about the Mercurial-devel
mailing list