D472: extensions: make wrapfunction() return a context manager
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Aug 29 17:00:43 UTC 2017
martinvonz added a comment.
In https://phab.mercurial-scm.org/D472#8969, @yuja wrote:
> This is off-topic, but if `wrapfunction()` is a context manager, I think
> `unwrapfunction()` could also be a context manager.
I agree. I think it makes sense to have wrapfunction() and unwrapfunction() and a context manager that uses both.
I also think using the return value of wrapfunction() is risky, so we should try to reduce uses of it, but let's keep that discussion out of this review.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D472
To: martinvonz, #hg-reviewers, quark, mjpieters
Cc: yuja, lothiraldan, quark, mjpieters, mercurial-devel
More information about the Mercurial-devel
mailing list