##// END OF EJS Templates
test-archive: stop checking md5 absolute values...
Patrick Mezard -
r4805:beb77470 default
parent child Browse files
Show More
@@ -39,16 +39,22 b' bunzip2 -dc test.tar.bz2 | tar tf -'
39 hg archive -t tgz -p %b-%h test-%h.tar.gz
39 hg archive -t tgz -p %b-%h test-%h.tar.gz
40 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/"
41
41
42 cat > md5check.py <<EOF
42 cat > md5comp.py <<EOF
43 import md5, sys
43 import md5, sys
44 print md5.md5(file(sys.argv[1], 'rb').read()).hexdigest()
44 f1, f2 = sys.argv[1:3]
45 h1 = md5.md5(file(f1, 'rb').read()).hexdigest()
46 h2 = md5.md5(file(f2, 'rb').read()).hexdigest()
47 print h1 == h2 or "md5 differ: " + repr((h1, h2))
45 EOF
48 EOF
46
49
50 # archive name is stored in the archive, so create similar
51 # archives and rename them afterwards.
47 hg archive -t tgz tip.tar.gz
52 hg archive -t tgz tip.tar.gz
48 python md5check.py tip.tar.gz
53 mv tip.tar.gz tip1.tar.gz
49 sleep 1
54 sleep 1
50 hg archive -t tgz tip.tar.gz
55 hg archive -t tgz tip.tar.gz
51 python md5check.py tip.tar.gz
56 mv tip.tar.gz tip2.tar.gz
57 python md5comp.py tip1.tar.gz tip2.tar.gz
52
58
53 hg archive -t zip -p /illegal test.zip
59 hg archive -t zip -p /illegal test.zip
54 hg archive -t zip -p very/../bad test.zip
60 hg archive -t zip -p very/../bad test.zip
@@ -26,8 +26,7 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
29 True
30 76ce33f5d5cf8151558e2d9a396c7504
31 abort: archive prefix contains illegal components
30 abort: archive prefix contains illegal components
32 Archive: test.zip
31 Archive: test.zip
33 testing: test/.hg_archival.txt OK
32 testing: test/.hg_archival.txt OK
General Comments 0
You need to be logged in to leave comments. Login now