Show More
@@ -1,38 +1,39 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir test |
|
3 | mkdir test | |
4 | cd test |
|
4 | cd test | |
5 | hg init |
|
5 | hg init | |
6 | echo foo>foo |
|
6 | echo foo>foo | |
7 | hg addremove |
|
7 | hg addremove | |
8 | hg commit -m 1 |
|
8 | hg commit -m 1 | |
9 | echo bar>bar |
|
9 | echo bar>bar | |
10 | hg addremove |
|
10 | hg addremove | |
11 | hg commit -m 2 |
|
11 | hg commit -m 2 | |
12 | mkdir baz |
|
12 | mkdir baz | |
13 | echo bletch>baz/bletch |
|
13 | echo bletch>baz/bletch | |
14 | hg addremove |
|
14 | hg addremove | |
15 | hg commit -m 3 |
|
15 | hg commit -m 3 | |
16 | echo "[web]" >> .hg/hgrc |
|
16 | echo "[web]" >> .hg/hgrc | |
17 | echo "name = test-archive" >> .hg/hgrc |
|
17 | echo "name = test-archive" >> .hg/hgrc | |
18 | echo "allowzip = true" >> .hg/hgrc |
|
18 | echo "allowzip = true" >> .hg/hgrc | |
19 | echo "allowgz = true" >> .hg/hgrc |
|
19 | echo "allowgz = true" >> .hg/hgrc | |
20 | echo "allowbz2 = true" >> .hg/hgrc |
|
20 | echo "allowbz2 = true" >> .hg/hgrc | |
21 | hg serve -p 20059 > /dev/null & |
|
21 | serverpid=`mktemp` | |
22 | sleep 1 # wait for server to be started |
|
22 | hg serve -p 20059 -d --pid-file=$serverpid | |
23 |
|
23 | |||
24 | TIP=`hg id -v | cut -f1 -d' '` |
|
24 | TIP=`hg id -v | cut -f1 -d' '` | |
25 | QTIP=`hg id -q` |
|
25 | QTIP=`hg id -q` | |
26 | cat > getarchive.py <<EOF |
|
26 | cat > getarchive.py <<EOF | |
27 | import sys, urllib2 |
|
27 | import sys, urllib2 | |
28 | node, archive = sys.argv[1:] |
|
28 | node, archive = sys.argv[1:] | |
29 | f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s' |
|
29 | f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s' | |
30 | % (node, archive)) |
|
30 | % (node, archive)) | |
31 | sys.stdout.write(f.read()) |
|
31 | sys.stdout.write(f.read()) | |
32 | EOF |
|
32 | EOF | |
33 | http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/" |
|
33 | http_proxy= python getarchive.py "$TIP" gz | tar tzf - | sed "s/$QTIP/TIP/" | |
34 | http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/" |
|
34 | http_proxy= python getarchive.py "$TIP" bz2 | tar tjf - | sed "s/$QTIP/TIP/" | |
35 | http_proxy= python getarchive.py "$TIP" zip > archive.zip |
|
35 | http_proxy= python getarchive.py "$TIP" zip > archive.zip | |
36 | unzip -t archive.zip | sed "s/$QTIP/TIP/" |
|
36 | unzip -t archive.zip | sed "s/$QTIP/TIP/" | |
37 |
|
37 | |||
38 | kill $! |
|
38 | kill `cat $serverpid` | |
|
39 | rm $serverpid |
@@ -1,15 +1,14 | |||||
1 | adding foo |
|
1 | adding foo | |
2 | adding bar |
|
2 | adding bar | |
3 | adding baz/bletch |
|
3 | adding baz/bletch | |
4 | test-archive-TIP/bar |
|
4 | test-archive-TIP/bar | |
5 | test-archive-TIP/baz/bletch |
|
5 | test-archive-TIP/baz/bletch | |
6 | test-archive-TIP/foo |
|
6 | test-archive-TIP/foo | |
7 | test-archive-TIP/bar |
|
7 | test-archive-TIP/bar | |
8 | test-archive-TIP/baz/bletch |
|
8 | test-archive-TIP/baz/bletch | |
9 | test-archive-TIP/foo |
|
9 | test-archive-TIP/foo | |
10 | Archive: archive.zip |
|
10 | Archive: archive.zip | |
11 | testing: test-archive-TIP/bar OK |
|
11 | testing: test-archive-TIP/bar OK | |
12 | testing: test-archive-TIP/baz/bletch OK |
|
12 | testing: test-archive-TIP/baz/bletch OK | |
13 | testing: test-archive-TIP/foo OK |
|
13 | testing: test-archive-TIP/foo OK | |
14 | No errors detected in compressed data of archive.zip. |
|
14 | No errors detected in compressed data of archive.zip. | |
15 | killed! |
|
@@ -1,22 +1,23 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | mkdir test |
|
3 | mkdir test | |
4 | cd test |
|
4 | cd test | |
5 | echo foo>foo |
|
5 | echo foo>foo | |
6 | hg init |
|
6 | hg init | |
7 | hg addremove |
|
7 | hg addremove | |
8 | hg commit -m 1 |
|
8 | hg commit -m 1 | |
9 | hg verify |
|
9 | hg verify | |
10 | hg serve -p 20059 > /dev/null & |
|
10 | serverpid=`mktemp` | |
11 | sleep 1 # wait for server to be started |
|
11 | hg serve -p 20059 -d --pid-file=$serverpid | |
12 | cd .. |
|
12 | cd .. | |
13 |
|
13 | |||
14 | hg clone http://localhost:20059/ copy |
|
14 | hg clone http://localhost:20059/ copy | |
15 | cd copy |
|
15 | cd copy | |
16 | hg verify |
|
16 | hg verify | |
17 | hg co |
|
17 | hg co | |
18 | cat foo |
|
18 | cat foo | |
19 | hg manifest |
|
19 | hg manifest | |
20 | hg pull |
|
20 | hg pull | |
21 |
|
21 | |||
22 | kill $! |
|
22 | kill `cat $serverpid` | |
|
23 | rm $serverpid |
@@ -1,22 +1,21 | |||||
1 | adding foo |
|
1 | adding foo | |
2 | checking changesets |
|
2 | checking changesets | |
3 | checking manifests |
|
3 | checking manifests | |
4 | crosschecking files in changesets and manifests |
|
4 | crosschecking files in changesets and manifests | |
5 | checking files |
|
5 | checking files | |
6 | 1 files, 1 changesets, 1 total revisions |
|
6 | 1 files, 1 changesets, 1 total revisions | |
7 | requesting all changes |
|
7 | requesting all changes | |
8 | adding changesets |
|
8 | adding changesets | |
9 | adding manifests |
|
9 | adding manifests | |
10 | adding file changes |
|
10 | adding file changes | |
11 | added 1 changesets with 1 changes to 1 files |
|
11 | added 1 changesets with 1 changes to 1 files | |
12 | checking changesets |
|
12 | checking changesets | |
13 | checking manifests |
|
13 | checking manifests | |
14 | crosschecking files in changesets and manifests |
|
14 | crosschecking files in changesets and manifests | |
15 | checking files |
|
15 | checking files | |
16 | 1 files, 1 changesets, 1 total revisions |
|
16 | 1 files, 1 changesets, 1 total revisions | |
17 | foo |
|
17 | foo | |
18 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo |
|
18 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo | |
19 | pulling from http://localhost:20059/ |
|
19 | pulling from http://localhost:20059/ | |
20 | searching for changes |
|
20 | searching for changes | |
21 | no changes found |
|
21 | no changes found | |
22 | killed! |
|
General Comments 0
You need to be logged in to leave comments.
Login now