tests: expand test coverage for updating phases
Consolidating the tests demonstrated that there are behavior
differences when pushing phases between bundle1 and bundle2.
A reason for this is the behavior of legacy pushes where the client
queries the state of phases and then conditionally updates phases
after an "unbundle" is processed. This behavior is expected.
The tests were incomplete because they only tested the case of a
publishing repo. In this commit, we add a variant for a non-publishing
repo. We still see some differences between the legacy and bundle2
exchanges. But they are less pronounced.
The behavior of not firing a pushkey hook when phases are updated as
part of changegroup application feels weird to me. I'm not sure if
this is a feature or a bug. By the time the "pushkey" or "phases"
bundle2 part is applied, the phases have already been moved on
a publishing repository. We fire the "pushkey" hook regardless,
even though it would be a no-op. This is the part that feels the
most buggy.
tests: consolidate test-push-http.t and test-push-http-bundle1.t
These tests were initially copies of each other. Now that we have
#testcases support in .t tests, we can consolidate them.
The changes to test-push-http.t reflect the differences between that
file and test-push-http-bundle1.t.
The variances in phases push behavior are the biggest differences.
The test will be updated in a subsequent commit to make the differences
more clear and to expand test coverage. For now, let's just port
the differences verbatim to get the tests consolidated.
tests: port value-less unbundle capability test to test-push-http.t
This test is present in test-push-http-bundle1.t. Let's add it to
test-push-http.t to further unify the tests.
tests: add phase testing to test-push-http-bundle1.t
test-push-http.t and test-push-http-bundle1.t were initially copies.
Now that we have support for inline test variants, we can combine them.
One of the variances between the tests is testing of phase moving.
We add the missing code to test-push-http-bundle1.t.
cmdutil: narrow scope of KeyError in makefilename()
It seemed too broad to catch a standard Python exception.
node: make bin() be a wrapper instead of just an alias
This includes a full backout of
59affe7e and
30d0cb27. Per the review
of the former, we'd rather adapt the API to behave like it used to (at
least for now), and take a second run at it if it shows up in our
performance numbers. I ran perfrevlogindex with and without this
change and it didn't make a measurable difference, so maybe it's fine
(despite my intuition to the contrary).
Differential Revision: https://phab.mercurial-scm.org/D2279
tests: actually check that HGDEMANDIMPORT=disable disables demandimport
At the point in the test where we were checking that the 'node' got
eagerly loaded, it had already been loaded (via the pvec module), so
our check wasn't doing anything (i.e. the test would pass even if you
removed the line that set HGDEMANDIMPORT=disable). Let's move this
test earlier so it tests what it was meant to test.
Differential Revision: https://phab.mercurial-scm.org/D2286