tests/test-http
author Brendan Cully <brendan@kublai.com>
Mon, 02 Oct 2006 17:37:57 -0700
changeset 3236 a63be0dfa42e
parent 3015 fa4229c60dd7
child 4130 178007785be8
permissions -rwxr-xr-x
Move raw theme into subdirectory
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
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
     3
hg init test
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     4
cd test
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     5
echo foo>foo
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
     6
hg commit -A -d '0 0' -m 1
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
     7
hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
     8
hg serve -p 20060 -d --pid-file=../hg2.pid
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     9
cd ..
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    10
cat hg1.pid hg2.pid >> $DAEMON_PIDS
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    11
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    12
echo % clone via stream
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
    13
http_proxy= hg clone --uncompressed http://localhost:20059/ 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
    14
  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
    15
hg verify -R copy
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    16
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
    17
echo % try to clone via stream, should use pull instead
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
    18
http_proxy= hg clone --uncompressed http://localhost:20060/ copy2
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    19
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    20
echo % clone via pull
2613
479e26afa10f clone: do not make streaming default. add --stream option instead.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2612
diff changeset
    21
http_proxy= hg clone http://localhost:20059/ copy-pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    22
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
    23
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    24
cd test
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    25
echo bar > bar
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    26
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
    27
cd ..
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    28
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    29
echo % pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    30
cd copy-pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    31
echo '[hooks]' >> .hg/hgrc
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    32
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    33
hg pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
    34
cd ..