bundle2: drop duplicated definition of 'b2x:exchange'

This bundle2 capability is going to be dynamically computed in 'getrepocaps'. We
do not need to include it in the static value.

--HG--
extra : rebase_source : f04d232381fa42967e852d71988f378a1e135069
bundle2: handle empty 'b2x:changegroup' value in push and pull

Changeset e4dc2b0be056 added advertising of supported changegroup version
through the new 'b2x:changegroup' capability. However, this capability is not
new and has been around since 3.1 with an empty value. This makes new clients
unable to push to 3.2 servers through bundle2 as they cannot find a common
changegroup version to use from and empty list.

Treating empty 'b2x:changegroup' value as old client fixes it.
patchbomb: extract 'getoutgoing' closure into its own function

The patchbomb command is a gigantic 300 line function full of closures. As a
first step to simplify it in smaller bits, I'm extracting the closures into full
featured functions. The first victim is 'getoutgoing'. It gains a docstring in
the process.
patchbomb: extract 'getpatches' closure in its own function

Keep marching toward the promised land of simplification!

--HG--
extra : rebase_source : c355b4de957a232d22c7ff1be74dacebb175721b
patchbomb: extract 'getbundle' closure in its own function

Keep marching toward the promised land of simplification!
patchbomb: extract 'getdescription' closure in its own function

Keep marching toward the promised land of simplification!

--HG--
extra : rebase_source : 0f08a9b0c1cbca91f9ded2b35a14644f1286dd08
patchbomb: extract 'getbundlemsgs' closure in its own function

Keep marching toward the promised land of simplification!
patchbomb: extract 'makeintro' closure into its own function

Keep marching toward the promised land of simplification!
patchbomb: extract 'getpatchmsgs' closure into its own function

Keep marching toward the promised land of simplification!
dagutil: fix id/ix typos in docstrings

--HG--
extra : rebase_source : cda9af1a1e0c53f9b39f69a77e8dac923bfe74c9
exchange: fix indentation in _pullchangeset

--HG--
extra : rebase_source : 904aa23e426370ad17d4289c8be0a6439676e526
exchange: prepare kwargs for bundle2 part generation exactly once

--HG--
extra : rebase_source : e7dd66012320023bb987bca8c2155cd1b0390c64
exchange: swap "push" for "pull" in pulloperation docstring

--HG--
extra : rebase_source : d05616a151a27110748932247f974f6485048022
transaction: allow registering a post-close callback

The addchangegroup code considers the transaction done after a 'tr.close()' call
and schedules the hook's execution for after lock release. In the nested transaction
case, the transaction is not yet committed and we must delay this scheduling.
We add an 'addpostclose' method (like the 'addpending' and 'addfinalize' ones) that
registers code to be run if the transaction is successfully committed.
changegroup: use the 'postclose' API on transaction

The post-transaction hooks run after the lock release (because hooks may want to
touch the repository), but they must only run if the transaction is successfully
closed.

We use the new 'addpostclose' method on transaction to register a callback
installing this post-lock-release call.
exchange: use the postclose API on transaction

As with changegroup, we should wait for the transaction to be really closed
before scheduling hook execution.

--HG--
extra : rebase_source : 31787127511114de6dc42e975d72360ad0f70216
test-status-rev: remove duplicate tests

The second group of tests in test-status-rev compare to an empty
revision. The first group of tests that compare to the first commit
should be testing all the same states with the missing_* files, so
drop the second group of tests.

--HG--
extra : rebase_source : 31152f41cf18c5816e6cdea1177f973efedc9fd8
test-status-rev: use one glob for each expected status

It's getting a little hard to read the ~30 calls to 'hg status' with
one per file. Instead, let's use one glob for each expected
status. For example, modified files can be listed with
'glob:content1_*_content[23]-tracked'. That also nicely becomes an
explanation for why each status is expected.

--HG--
extra : rebase_source : ae4b18f47b7db932f3ec75cff78814008c1eba65
test-status-rev: remove unnecessary initial commit

The initial commit was there when we had a group of tests that
compared against an empty base, but since those tests no longer exist,
we can drop the empty commit.

--HG--
extra : rebase_source : 2cabdd5dbd2eb468b99d3daf7437c8ac3459f287
test-status-rev: add tests for plain dirstate and inter-revision status

We have tests for the status across from '.^' to the working copy. It
makes sense to have the similar tests for the inter-revision status
between '.^' and '.' and for the dirstate status in the same
place.

--HG--
extra : rebase_source : 13abe8d5044e4cc5f571e52c8760e456924cd4c5