HomePhabricator

changegroup: fix to allow empty manifest parts

Authored by durham.

Description

changegroup: fix to allow empty manifest parts

The current chunk reading algorithm relied on counting the number of empty
chunks and comparing it to the number of chunk lists it expected (1 list of
files for cg1 and cg2, and 1 list of files + 1 list of trees for cg3). This
implicitly assumed that both the changelog part and the manifestlog part were
never empty (since them being empty would cause it to count it as one list being
done, and screw up the count). In our treemanifest code, the manifest section
could be empty, so we need to handle that case.

This patches refactors that code to be more explicit about how it counts the
expected parts.

Differential Revision: https://phab.mercurial-scm.org/D646

Details

Committed
durhamSep 6 2017, 9:33 PM
Differential Revision
D646: changegroup: fix to allow empty manifest parts
Parents
rHGa763c891f36e: wrapcommand: use functools.partial
Branches
Unknown
Tags
Unknown