##// END OF EJS Templates
archive: test md5 consistency
Brendan Cully -
r4653:ca023b63 default
parent child Browse files
Show More
@@ -4,15 +4,12 b' 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 commit -Am 1 -d '1 0'
8 hg commit -m 1
9 echo bar>bar
8 echo bar>bar
10 hg addremove
9 hg commit -Am 2 -d '2 0'
11 hg commit -m 2
12 mkdir baz
10 mkdir baz
13 echo bletch>baz/bletch
11 echo bletch>baz/bletch
14 hg addremove
12 hg commit -Am 3 -d '1000000000 0'
15 hg commit -m 3
16 echo "[web]" >> .hg/hgrc
13 echo "[web]" >> .hg/hgrc
17 echo "name = test-archive" >> .hg/hgrc
14 echo "name = test-archive" >> .hg/hgrc
18 echo "allow_archive = gz bz2, zip" >> .hg/hgrc
15 echo "allow_archive = gz bz2, zip" >> .hg/hgrc
@@ -42,6 +39,17 b' bunzip2 -dc test.tar.bz2 | tar tf -'
42 hg archive -t tgz -p %b-%h test-%h.tar.gz
39 hg archive -t tgz -p %b-%h test-%h.tar.gz
43 gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/"
40 gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/"
44
41
42 cat > md5check.py <<EOF
43 import md5, sys
44 print md5.md5(file(sys.argv[1], 'rb').read()).hexdigest()
45 EOF
46
47 hg archive -t tgz tip.tar.gz
48 python md5check.py tip.tar.gz
49 sleep 1
50 hg archive -t tgz tip.tar.gz
51 python md5check.py tip.tar.gz
52
45 hg archive -t zip -p /illegal test.zip
53 hg archive -t zip -p /illegal test.zip
46 hg archive -t zip -p very/../bad test.zip
54 hg archive -t zip -p very/../bad test.zip
47
55
@@ -26,6 +26,8 b' test-TIP/.hg_archival.txt'
26 test-TIP/bar
26 test-TIP/bar
27 test-TIP/baz/bletch
27 test-TIP/baz/bletch
28 test-TIP/foo
28 test-TIP/foo
29 76ce33f5d5cf8151558e2d9a396c7504
30 76ce33f5d5cf8151558e2d9a396c7504
29 abort: archive prefix contains illegal components
31 abort: archive prefix contains illegal components
30 Archive: test.zip
32 Archive: test.zip
31 testing: test/.hg_archival.txt OK
33 testing: test/.hg_archival.txt OK
General Comments 0
You need to be logged in to leave comments. Login now