test-archive failing with "tar: Record size = 8 blocks"

Mads Kiilerich mads at kiilerich.com
Fri Feb 27 13:54:16 CST 2009


FYI: test-archive fails with GNU tar 1.21.

I think it is a tar bug, but should we add a workaround anyway?

/Mads


ERROR: test-archive output changed
--- Expected output
+++ Test output
@@ -24,6 +24,7 @@
 test-archive-TIP/bar
 test-archive-TIP/baz/bletch
 test-archive-TIP/foo
+tar: Record size = 8 blocks
 test-archive-TIP/.hg_archival.txt
 test-archive-TIP/bar
 test-archive-TIP/baz/bletch
@@ -52,6 +53,7 @@
     testing: test/baz/bletch          OK
     testing: test/foo                 OK
 No errors detected in compressed data of test.zip.
+tar: Record size = 16 blocks
 test-TIP/.hg_archival.txt
 test-TIP/bar
 test-TIP/baz/bletch
!
Failed test-archive: output changed


diff -r 6d99ff7b79b5 tests/test-archive
--- a/tests/test-archive    Fri Feb 27 08:13:42 2009 -0600
+++ b/tests/test-archive    Fri Feb 27 20:50:11 2009 +0100
@@ -58,8 +58,8 @@
                     % (os.environ['HGPORT'], node, archive))
 sys.stdout.write(f.read())
 EOF
-http_proxy= python getarchive.py "$TIP" gz | gunzip | tar tf - | sed 
"s/$QTIP/TIP/"
-http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - | sed 
"s/$QTIP/TIP/"
+http_proxy= python getarchive.py "$TIP" gz | gunzip | tar tf - 2> 
/dev/null | sed "s/$QTIP/TIP/"
+http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2> 
/dev/null | sed "s/$QTIP/TIP/"
 http_proxy= python getarchive.py "$TIP" zip > archive.zip
 unzip -t archive.zip | sed "s/$QTIP/TIP/"
 
@@ -69,10 +69,10 @@
 tar tf test.tar
 
 hg archive -t tbz2 -X baz test.tar.bz2
-bunzip2 -dc test.tar.bz2 | tar tf -
+bunzip2 -dc test.tar.bz2 | tar tf - 2> /dev/null
 
 hg archive -t tgz -p %b-%h test-%h.tar.gz
-gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/"
+gzip -dc test-$QTIP.tar.gz | tar tf - 2> /dev/null | sed "s/$QTIP/TIP/"
 
 cat > md5comp.py <<EOF
 from mercurial.util import md5
@@ -98,7 +98,7 @@
 hg archive --config ui.archivemeta=false -t zip -r 2 test.zip
 unzip -t test.zip
 
-hg archive -t tar - | tar tf - | sed "s/$QTIP/TIP/"
+hg archive -t tar - | tar tf - 2> /dev/null | sed "s/$QTIP/TIP/"
 
 hg archive -r 0 -t tar rev-%r.tar
 if [ -f rev-0.tar ]; then



More information about the Mercurial-devel mailing list