( )⚙ D8502 cleanup: avoid extra node/ctx conversions in logcmdutil.diffordiffstat

This is an archive of the discontinued Mercurial Phabricator instance.

cleanup: avoid extra node/ctx conversions in logcmdutil.diffordiffstat
ClosedPublic

Authored by durin42 on May 7 2020, 5:25 PM.

Details

Summary

I'm about to write some code that wants to pass a memctx to
diffordiffstat, but this feels like a meritorious cleanup anyway,
since the first thing this method does is turn nodes into contexts,
and most callers have a context handy.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

durin42 created this revision.May 7 2020, 5:25 PM
durin42 updated this revision to Diff 21339.May 11 2020, 5:34 PM

Mention API change in relnotes/next?

mercurial/commands.py
2494–2497

Can avoid converting to nodes and back by changing this

2494–2497

Oh, next patch does that...

indygreg accepted this revision.May 12 2020, 8:17 PM
This revision is now accepted and ready to land.May 12 2020, 8:17 PM