Mercurial > hg
annotate tests/test-static-http @ 1933:7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Some systems show "Thu Jan 01" instead of "Thu Jan 1", which breaks tests.
Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on
all systems.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 13 Mar 2006 13:05:41 +0100 |
parents | 7d83a351a936 |
children | d32c442571f2 |
rev | line source |
---|---|
1111 | 1 #!/bin/sh |
2 | |
1923
7d83a351a936
fix testsuite for freebsd and one timingissue
Peter van Dijk <peter@dataloss.nl>
parents:
1502
diff
changeset
|
3 http_proxy= hg clone old-http://localhost:20059/ copy > clonefail.out 2>&1 |
1111 | 4 echo $? |
1923
7d83a351a936
fix testsuite for freebsd and one timingissue
Peter van Dijk <peter@dataloss.nl>
parents:
1502
diff
changeset
|
5 sed 's/[0-9]//g' < clonefail.out |
1111 | 6 ls copy |
7 | |
8 # This server doesn't do range requests so it's basically only good for | |
9 # one pull | |
10 cat > dumb.py <<EOF | |
11 import BaseHTTPServer, SimpleHTTPServer, signal | |
12 | |
13 def run(server_class=BaseHTTPServer.HTTPServer, | |
14 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): | |
15 server_address = ('localhost', 20059) | |
16 httpd = server_class(server_address, handler_class) | |
17 httpd.serve_forever() | |
18 | |
19 signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) | |
20 run() | |
21 EOF | |
22 | |
23 python dumb.py 2>/dev/null & | |
24 | |
25 mkdir remote | |
26 cd remote | |
27 hg init | |
28 echo foo > bar | |
29 hg add bar | |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1923
diff
changeset
|
30 hg commit -m"test" -d "1000000 0" |
1111 | 31 hg tip |
32 | |
33 cd .. | |
34 | |
1128
8bf19f96b97a
Fixed test-static-http with http_proxy variable set.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1111
diff
changeset
|
35 http_proxy= hg clone old-http://localhost:20059/remote local |
1111 | 36 |
37 cd local | |
38 hg verify | |
39 cat bar | |
1502
1170fef58071
Fixed test-static-http with http_proxy variable set again.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1128
diff
changeset
|
40 http_proxy= hg pull |
1111 | 41 |
42 kill $! |