This is an archive of the discontinued Mercurial Phabricator instance.

exchangev2: fetch changeset revisions
ClosedPublic

Authored by indygreg on Sep 5 2018, 12:20 PM.

Details

Summary

All Mercurial repository data is derived from changesets:
you can't do anything unless you have changesets. Therefore,
it makes sense for changesets to be the first piece of data
that we transfer as part of pull.

To do this, we call our new "changesetdata" command, requesting
parents and revision data. This gives us all the data that a
changegroup delta group would give us. We simply normalize
this data into what addgroup() expects and call that API on
the changelog to bulk insert revisions into the changelog.

Code in this commit is heavily borrowed from
changegroup.cg1unpacker.apply().

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.Sep 5 2018, 12:20 PM
durin42 accepted this revision.Sep 12 2018, 11:16 AM
This revision is now accepted and ready to land.Sep 12 2018, 11:16 AM
This revision was automatically updated to reflect the committed changes.