tests/test-http
author Bernhard Leiner <bleiner@gmail.com>
Sat, 02 Aug 2008 22:10:10 +0200
changeset 6858 8f256bf98219
parent 6263 573534c6b540
child 8167 6c82beaaa11a
permissions -rwxr-xr-x
Add support for multiple possible bisect results (issue1228, issue1182) The real reason for both issue is that bisect can not handle cases where there are multiple possibilities for the result. Example (from issue1228): rev 0 -> good rev 1 -> skipped rev 2 -> skipped rev 3 -> skipped rev 4 -> bad Note that this patch does not only fix the reported Assertion Error but also the problem of a non converging bisect: hg init for i in `seq 3`; do echo $i > $i; hg add $i; hg ci -m$i; done hg bisect -b 2 hg bisect -g 0 hg bisect -s From this state on, you can: a) mark as bad forever (non converging!) b) mark as good to get an inconsistent state c) skip for the Assertion Error Minor description and code edits by pmezard.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     2
4289
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
     3
cp "$TESTDIR"/printenv.py .
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
     4
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
     5
hg init test
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     6
cd test
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     7
echo foo>foo
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
     8
hg commit -A -d '0 0' -m 1
5384
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
     9
hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=../hg1.pid
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
    10
hg serve -p $HGPORT1 -d --pid-file=../hg2.pid
4130
178007785be8 web/server: disable address reuse option for BaseHTTPServer on windows
Patrick Mezard <pmezard@gmail.com>
parents: 3015
diff changeset
    11
# Test server address cannot be reused
6263
573534c6b540 adjust test-http output to non-default HGPORT, e.g. with run-tests.py -j
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6262
diff changeset
    12
hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':20060':/"
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    13
cd ..
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    14
cat hg1.pid hg2.pid >> $DAEMON_PIDS
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    15
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    16
echo % clone via stream
5384
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
    17
http_proxy= hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | \
3015
fa4229c60dd7 Allow for MB/sec transfer rates in test-http-proxy and test-ssh.
Lee Cantey <lcantey@gmail.com>
parents: 2986
diff changeset
    18
  sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    19
hg verify -R copy
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    20
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
    21
echo % try to clone via stream, should use pull instead
5384
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
    22
http_proxy= hg clone --uncompressed http://localhost:$HGPORT1/ copy2
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    23
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    24
echo % clone via pull
5384
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
    25
http_proxy= hg clone http://localhost:$HGPORT1/ copy-pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    26
hg verify -R copy-pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    27
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    28
cd test
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    29
echo bar > bar
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    30
hg commit -A -d '1 0' -m 2
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    31
cd ..
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    32
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    33
echo % pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    34
cd copy-pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    35
echo '[hooks]' >> .hg/hgrc
4289
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
    36
echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
5384
e3a0c092b4e2 Allow tests to run in parallel.
Bryan O'Sullivan <bos@serpentine.com>
parents: 4289
diff changeset
    37
hg pull | sed -e 's,:[0-9][0-9]*/,/,'
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    38
cd ..