Commit Graph

36 Commits

Author SHA1 Message Date
Boris Feld
f12384139a test: fix common-pattern for pure variant
The $USUAL_COMPRESSIONS$ value that was taken was not compatible with the pure
variant systems as zlib seems to not be available in these case.

Differential Revision: https://phab.mercurial-scm.org/D1562
2017-11-29 23:20:52 -05:00
Boris Feld
5e36a9bc8b test-pattern: actually update tests using the patterns
We mass update the tests now. This will help the next soul touching the http
protocol.
2017-11-05 08:23:12 +01:00
Denis Laxalde
9efc7f05e3 transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Upon pull or unbundle, we display a message with the range of new revisions
fetched. This revision range could readily be used after a pull to look out
what's new with 'hg log'. The algorithm takes care of filtering "obsolete"
revisions that might be present in transaction's "changes" but should not be
displayed to the end user.
2017-10-12 09:39:50 +02:00
Augie Fackler
124f75c2d3 treediscovery: update test expectation
I'm not sure why this needs an update, but the test passes for me both
pure and non-pure.

Differential Revision: https://phab.mercurial-scm.org/D860
2017-09-30 12:58:06 -04:00
Boris Feld
386e89884f discovery: avoid dropping remote heads hidden locally
An extra post processing was added to recognize remote heads that are hidden
locally as "common" instead of "unknown". However, this processing was
removing such hidden heads from the remote heads sets.

It had no impact because we used to pull phase information from all remote
heads.

This series will replace the phase pulling operation to a more efficient
process but requires the unmodified pulled set information.
2017-09-20 05:47:33 +02:00
Augie Fackler
899d0275a8 tests: fix up some http tests for no-zstd case 2017-01-18 11:54:51 -05:00
Gregory Szorc
e1840d5435 httppeer: advertise and support application/mercurial-0.2
Now that servers expose a capability indicating they support
application/mercurial-0.2 and compression, clients can key off
this to say they support responses that are compressed with
various compression formats.

After this commit, the HTTP wire protocol client now sends an
"X-HgProto-<N>" request header indicating its support for
"application/mercurial-0.2" media type and various compression
formats.

This commit also implements support for handling
"application/mercurial-0.2" responses. It simply reads the header
compression engine identifier then routes the remainder of the
response to the appropriate decompressor.

There were some test changes, but only to logging. That points to
an obvious gap in our test coverage. This will be addressed in a
subsequent commit once server support is in place (it is hard to
test without server support).
2016-12-24 15:22:18 -07:00
timeless
cc4a444d91 tests: tolerate http2
You can run tests like this:
run-tests.py -l --extra-config-opt ui.usehttp2=true

And ideally, no tests should fail...
2016-04-21 04:30:18 +00:00
Matt Mackall
b709208c37 tests: drop DAEMON_PIDS from killdaemons calls 2015-06-08 14:55:40 -05:00
Matt Mackall
3ad28905f6 tests: drop explicit $TESTDIR from executables
$TESTDIR is added to the path, so this is superfluous. Also,
inconsistent use of quotes means we might have broken on tests with
paths containing spaces.
2015-06-08 14:44:30 -05:00
Pierre-Yves David
662f0bd556 pull: only list remote bookmarks if -B is used to populate pulled heads
Listing remote bookmarks results in network traffic and latency. This
should be avoided when possible.
2015-05-28 13:55:03 -07:00
Pierre-Yves David
a265f2a1e8 test-discovery: disable bundle2 for legacy test (issue4610)
We need to disable the "bundle2" capability to ensure we stay on legacy
capability.
2015-04-21 11:18:47 +02:00
Pierre-Yves David
1cc9c00470 discovery: properly exclude locally known but filtered heads
The conditional was a bit too narrow and produced buggy result when a node was
present in both common and heads (because it pleased the discovery) and it was
locally known but filtered.

This resulted in buggy getbundle request and server side crash.
2015-01-30 21:11:02 +00:00
Eric Sumner
7be426bb53 incoming: handle phases the same as pull
Now that bundlerepo can move phases safely, 'hg incoming' can share its phase
handling code with pull to better reflect what would actually show up.
2014-12-18 12:33:17 -08:00
Pierre-Yves David
627b3886af pull: move bookmark movements inside the exchange.pull
There is no reason for bookmarks to get a special treatment. As a first step we
move the code as is in the `exchange.pull` function. Integration with the rest
of the flow will come later.

Adding bookmarks to pull means that most clone paths are now pulling bookmarks
through pull. We ensure that bookmark-update messages are properly suppressed in
that case.

In test-pull-http.t the 'requesting all changes' message disappear because we
now get the authentication error on the `listkeys`command before such message
is printed.
2014-09-26 17:44:00 -07:00
Pierre-Yves David
f2ec8aebea push: move bookmark discovery with other discovery steps
The discovery of necessary bookmark updates is now done within the "discovery
phase". This opens the door to the inclusion of bookmarks in a unified bundle2
push.
2014-08-15 18:39:39 -07:00
Pierre-Yves David
4a47cfe509 test-treediscovery: update output after merge
Recent change in the push process introduced an extra listing of the phase
name space before the push (on default). Meanwhile on default, a fix introduced
a new test with debug output.

We update the test output to be correct.
2014-08-15 14:19:15 -07:00
Matt Mackall
92e0debc2b merge with stable 2014-08-15 11:48:05 -05:00
Mads Kiilerich
7f9b497a4c incoming: don't request heads that already are common
Pull would send a getbundle command where common heads were sent both as common
and head, even though there is no reason to request a common head.
The request was thus twice as big as necessary and more likely to hit HTTP
header size limits.

Instead, don't request heads that already are common.

This is fixed in bundlerepo.getremotechanges . It could perhaps also have been
fixed in discovery.findcommonincoming but that would have a bigger impact.
2014-08-15 03:24:40 +02:00
Mads Kiilerich
c6b11d841f tests: improve test coverage for discovery and actual parameters for pulling 2014-08-15 03:24:40 +02:00
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Matt Mackall
13868fbdf3 tests: backout c12b14874aad pid check 2014-02-15 22:09:32 -06:00
Simon Heimberg
748f958f1a tests: test that the pid returned by hg serve looks reasonable
This failed on windows before win32.spawndetached has been fixed. The process
name was "cmd.exe" and not "hg.exe" or "python.exe".
2014-02-09 00:26:01 +01:00
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01:00
Patrick Mezard
3f23aa6a3f tests: enable more server tests on Windows 2012-09-12 22:21:54 +02:00
Patrick Mezard
7d8680da1f killdaemons: take file argument explicitely
It makes it easier to use as a generic replacement for kill utility,
mostly for Windows tests.
2012-08-20 22:36:51 +02:00
Matt Mackall
31ad230c52 pull: backout change to return code
This bit a number of people.
2012-02-10 16:09:30 -06:00
Matt Mackall
902bee47a8 pull: return 1 when no changes found (BC)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       1

This makes pull agree with the rest of the table and makes it easy to
detect "nothing was pulled" in scripts.
2012-01-30 16:01:54 -06:00
Matt Mackall
2157179ce3 push: return 1 if no changes found (issue3228)
Currently we have the following return codes if nothing is found:

                commit   incoming    outgoing      pull     push
intended           1        1           1            1       1
documented         1        1           1            0       1
actual             1        1           1            0       0

This fixes the lower-right entry.
2012-01-30 11:32:09 -06:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Jim Hague
f6f49b778c treediscovery: rename stop() in tests to fix failures on AIX.
It seems ksh, the default shell on AIX, does not permit the creation of a
function called stop(). test-treediscovery.t and test-treediscovery-legacy.t
both fail on AIX with error 'syntax error at line 25 : `(' unexpected'.

Fix by renaming stop() in the scripts to tstop(). For completeness
rename start() to tstart() to match. Both tests then pass on AIX.

Add check for the use of stop() in a shell script to check-code.
2011-07-05 11:53:32 +01:00
Peter Arrenbrecht
a276877b67 treediscovery: always return all remote heads
Old discovery only returned incoming heads, not all of them (for
changegroupsubset). New discovery must always return all of the remote heads
(for getbundle). I failed to properly adjust treediscovery in 43f4c1113c8d
when introducing setdiscovery.

The actual observable problem was 'remote: unsynced changes' when trying
to push a cset on one named branch to a server with a new cset on another
named branch. This scenario is now tested in test-treediscovery.t.
2011-06-20 14:11:01 +02:00
Peter Arrenbrecht
15e07c068a tests: add tests for partial pulls with treediscovery 2011-05-23 20:31:39 +02:00
Mads Kiilerich
938d75f22d check-code: fix checking for sh style in .t tests
Restore checks after they were disabled by a1f828662ac8.
2011-05-06 00:34:10 +02:00
Martin Geisler
9f8b415ad1 test-treediscovery: fix escaping for both dash and bash
A '\n' on the command line is turned into a newline by dash, but kept
as-is by bash, which resulted in a syntax error in the config file.

Luckily, dash wont turn '\n' into a newline when it is part of a
here-doc, so we can write the config file using that technique.
2011-05-05 19:29:02 +02:00
Peter Arrenbrecht
85a1440d12 treediscovery: fix regression when run against older repos (issue2793)
I ran the entire test suite with "known" and "getbundle" disabled in
localrepository. This generated failures because the old findoutgoing
had always queried remote's heads explicitly and thus always got them
back in the returned heads. treediscovery.findcommonincoming now
correctly returns remote's heads in all cases.

Also adds a dedicated test for running treediscovery against a
pre-getbundle HTTP server.
2011-05-05 12:53:33 +02:00