Show More
@@ -1,39 +1,37 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir test |
|
4 | 4 | cd test |
|
5 | 5 | hg init |
|
6 | 6 | echo foo>foo |
|
7 | 7 | hg addremove |
|
8 | 8 | hg commit -m 1 |
|
9 | 9 | echo bar>bar |
|
10 | 10 | hg addremove |
|
11 | 11 | hg commit -m 2 |
|
12 | 12 | mkdir baz |
|
13 | 13 | echo bletch>baz/bletch |
|
14 | 14 | hg addremove |
|
15 | 15 | hg commit -m 3 |
|
16 | 16 | echo "[web]" >> .hg/hgrc |
|
17 | 17 | echo "name = test-archive" >> .hg/hgrc |
|
18 | 18 | echo "allowzip = true" >> .hg/hgrc |
|
19 | 19 | echo "allowgz = true" >> .hg/hgrc |
|
20 | 20 | echo "allowbz2 = true" >> .hg/hgrc |
|
21 | serverpid=`mktemp` | |
|
22 | hg serve -p 20059 -d --pid-file=$serverpid | |
|
21 | hg serve -p 20059 -d --pid-file=hg.pid | |
|
23 | 22 | |
|
24 | 23 | TIP=`hg id -v | cut -f1 -d' '` |
|
25 | 24 | QTIP=`hg id -q` |
|
26 | 25 | cat > getarchive.py <<EOF |
|
27 | 26 | import sys, urllib2 |
|
28 | 27 | node, archive = sys.argv[1:] |
|
29 | 28 | f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s' |
|
30 | 29 | % (node, archive)) |
|
31 | 30 | sys.stdout.write(f.read()) |
|
32 | 31 | EOF |
|
33 | 32 | http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/" |
|
34 | 33 | http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/" |
|
35 | 34 | http_proxy= python getarchive.py "$TIP" zip > archive.zip |
|
36 | 35 | unzip -t archive.zip | sed "s/$QTIP/TIP/" |
|
37 | 36 | |
|
38 |
kill `cat |
|
|
39 | rm $serverpid | |
|
37 | kill `cat hg.pid` |
@@ -1,23 +1,21 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir test |
|
4 | 4 | cd test |
|
5 | 5 | echo foo>foo |
|
6 | 6 | hg init |
|
7 | 7 | hg addremove |
|
8 | 8 | hg commit -m 1 |
|
9 | 9 | hg verify |
|
10 | serverpid=`mktemp` | |
|
11 | hg serve -p 20059 -d --pid-file=$serverpid | |
|
10 | hg serve -p 20059 -d --pid-file=hg.pid | |
|
12 | 11 | cd .. |
|
13 | 12 | |
|
14 | 13 | hg clone http://localhost:20059/ copy |
|
15 | 14 | cd copy |
|
16 | 15 | hg verify |
|
17 | 16 | hg co |
|
18 | 17 | cat foo |
|
19 | 18 | hg manifest |
|
20 | 19 | hg pull |
|
21 | 20 | |
|
22 |
kill `cat |
|
|
23 | rm $serverpid | |
|
21 | kill `cat ../test/hg.pid` |
General Comments 0
You need to be logged in to leave comments.
Login now