This is an archive of the discontinued Mercurial Phabricator instance.

changegroup: pass sorted revisions into group() (API)
ClosedPublic

Authored by indygreg on Aug 6 2018, 3:51 PM.

Details

Summary

Currently, group() receives a list of nodes and calls _sortgroup()
to sort them and turn them into revs. Since the sorting behavior
varies depending on the type of data being transferred, I think it
makes sense to perform the sorting before group() is invoked.

This commit extracts _sortgroup() to a pair of standalone functions.
It then moves the calling of these functions to the 3 call sites of
group(). group() now receives an iterable of revs instead of nodes.

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

indygreg created this revision.Aug 6 2018, 3:51 PM
This revision was automatically updated to reflect the committed changes.