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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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
2492–2495

Can avoid converting to nodes and back by changing this

2492–2495

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