This is an archive of the discontinued Mercurial Phabricator instance.

changegroup: move node sorting into deltagroup()
ClosedPublic

Authored by indygreg on Aug 9 2018, 7:12 PM.

Details

Summary

The 3 callers of deltagroup() all sort nodes and convert to
integer revs immediately before calling deltagroup().

Stepping back a bit, aside from the constraints on node ordering
that always apply (namely that a node must follow its ancestor),
it makes sense for sorting to be an implementation detail of the
store. Moving the sorting into deltagroup() will open the door
for moving sorting into a storage API.

The test for the changelog in deltagroup() to impact the sorting
method is a bit hacky. I suspect this will be resolved once
we establish a formal interface for delta group generation
and port changelog to it.

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 9 2018, 7:12 PM
This revision was automatically updated to reflect the committed changes.