This is an archive of the discontinued Mercurial Phabricator instance.

exchangev2: fetch and apply phases data
ClosedPublic

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

Details

Summary

Now that the server supports emitting phases data, we can request it
and apply it on the client.

Because we may receive phases-only updates from the server, we no
longer conditionally perform the "changesetdata" command depending
on whether there are revisions to fetch. In the previous wire
protocol, this case would result in us falling back to performing
"listkeys" commands to look up phases, bookmarks, etc data. But
since "changesetdata" is smart enough to handle metadata only
fetches, we can keep things consistent.

It's worth noting that because of the unified approach to changeset
data retrieval, phase handling code in wire proto v2 exchange is
drastically simpler. Contrast with all the code in exchange.py
dealing with all the variations for obtaining phases data.

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:15 AM
This revision is now accepted and ready to land.Sep 12 2018, 11:15 AM
indygreg updated this revision to Diff 10964.Sep 12 2018, 1:11 PM
This revision was automatically updated to reflect the committed changes.