Page MenuHomePhabricator

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

Authored by durin42 on Thu, May 7, 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.Thu, May 7, 5:25 PM
durin42 updated this revision to Diff 21339.Mon, May 11, 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.Tue, May 12, 8:17 PM
This revision is now accepted and ready to land.Tue, May 12, 8:17 PM