martinvonz added a comment.
In https://phab.mercurial-scm.org/D472#7758, @quark wrote: > In https://phab.mercurial-scm.org/D472#7756, @lothiraldan wrote: > > > All users of wrapfunction will need to be updated anyway to use the context manager style > > > I think only those who use the return value of wrapfunction will need change (actually, new code is more correct regarding on nested wrapfunction handling) and expect that to be not too many. If wrapfunction is used to replace a function permanently, it does not need change. > > Reusing name is more consistent with `repo.transaction`, `repo.lock` and `open`. I personally don't care much which way we go here. I originally did make it a separate function (wrappedfunction()) and did the wrapping in __enter__, but I'm fine either way. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D472 To: martinvonz, #hg-reviewers, quark, mjpieters Cc: lothiraldan, quark, mjpieters, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel