bundle2: fix bundle2 pulling all revs on empty pulls
When bundle2 was enabled, if hg pull had no commits to pull, it would print
'no changes found' and then download the entire repository from the server. This
was caused by heads and common being set to None, which gets treated as
heads=cl.heads() and common=[nullid], which means download the entire repo.
Pulling bundles without a changegroup is a valid use case (like if we're just
updating bookmarks), so this modifes the bundle code to allow not adding
changegroups.
This is backport of
ab5040cd5749.
exchange: fix bad indentation
Those two lines where double indented for no good reasons.
This is backport of
71931b789424.
exchange: propagate arguments to the _getbundleextrapart function
The arguments was wrongly propagated (again).
This a backport of
0055b5b3eb9c
bundle2: fix configuration name mismatch
During pulls bundle2 was checking server.bundle2, but during pushes it was
checking experimental.bundle2. This makes them both experimental.bundle2.
This is a backport of
750c7c14a637
revert: use p2 as parent when reverting against it
revert was always using p1 as parent. This created some minor misbehavior when
reverting against p2. See test change for an example of that.
This is also a useful cleanup for coming refactoring to revert.
revert: explicitly get status against the parent
This makes absolutely no functional changes. The default value for
node1 is already the same as the current value of parent. But to be
able to properly use the second parent in merge context, we have to
start to be a bit more explicit about what we compute the status
against.