( )⚙ D4190 changegroup: track changelog to manifest revision map explicitly

This is an archive of the discontinued Mercurial Phabricator instance.

changegroup: track changelog to manifest revision map explicitly
ClosedPublic

Authored by indygreg on Aug 9 2018, 2:51 PM.

Details

Summary

Previously, self._nextclrevtolocalrev was only populated as part
of the changelog lookup callback. But cgpacker._close() was looking
at self._nextclrevtolocalrev on every invocation.

Since self._nextclrevtolocalrev is for communicating the mapping
of changelog revisions to manifest revisions, this commit refactors
the code to make that explicit.

The changelog state now stores this mapping. And after the changelog
group is emitted, we update self._clrevtolocalrev with that dict.
self._nextclrevtolocalrev is unused and has been deleted.

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.