This is an archive of the discontinued Mercurial Phabricator instance.

extensions: add wrappedfunction() context manager
AbandonedPublic

Authored by martinvonz on Aug 29 2017, 1:01 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Several extensions exist that temporarily want to wrap a function (at
least narrowhg, any many of the extensions in hg-experimental). That's
why we have the unwrapfunction() that was introduced in 19578bb84731
(extensions: add unwrapfunction to undo wrapfunction, 2016-08-10).

This patch adds a simple wrappedfunction() that returns a context
manager.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped