This is an archive of the discontinued Mercurial Phabricator instance.

wireprotov2: unify file revision collection and linknode derivation
ClosedPublic

Authored by indygreg on Dec 10 2018, 2:43 PM.

Details

Summary

The old mechanism for choosing which file revisions to send in the
haveparents=True case was buggy in multiple ways - the most severe
of which being that file revisions were excluded when they shouldn't
have been.

This commit unifies the logic for deriving the filenodes that will
be sent by the "filesdata" command. We now consistently read files
data from manifests. The "haveparents" argument now controls whether
we iterate ctx.files() or use the full manifest to derive relevant
files.

The logic here is still woefully lacking to fully support shallow
clones. It will require an API break to fully address. This commit
should at least make the server APIs emit proper data, which is
strictly better than before.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Dec 10 2018, 2:43 PM
This revision was automatically updated to reflect the committed changes.