This is an archive of the discontinued Mercurial Phabricator instance.

mergestate: remove unnecessary clearing of `localctx` and `otherctx`
ClosedPublic

Authored by martinvonz on Sep 17 2020, 4:10 PM.

Details

Summary

As noted in the previous commit, there are no callers that (re-)use
the instance after calling reset(). There are also no callers that
call _read() after doing anything with the instance (it's only
called right after an instance is created).

If reviewers feel that this is too risky, I can extract and reuse the
poisoning code that indygreg once added for poisining repo instances.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Sep 17 2020, 4:10 PM
indygreg accepted this revision.Sep 17 2020, 10:19 PM
indygreg added a subscriber: indygreg.

Use of delattr is a bit wonky in the first place, as optional instance attributes feel like an anti-pattern to me. This is probably fine.

This revision is now accepted and ready to land.Sep 17 2020, 10:19 PM