# HG changeset patch # User Vadim Gelfer # Date 2006-04-21 22:47:27 # Node ID 98cc126f9f3f9ecfc7e8dc39db994576ff488439 # Parent 633d733e7b11e68856cac0bba8b96233e413642d update tests after changing archival code. test-archive now contains tests for archive command. diff --git a/tests/test-archive b/tests/test-archive --- a/tests/test-archive +++ b/tests/test-archive @@ -36,3 +36,18 @@ unzip -t archive.zip | sed "s/$QTIP/TIP/ kill `cat hg.pid` sleep 1 # wait for server to scream and die + +hg archive -t tar test.tar +tar tf test.tar + +hg archive -t tbz2 -X baz test.tar.bz2 +bunzip2 -dc test.tar.bz2 | tar tf - + +hg archive -t tgz -p %b-%h test-%h.tar.gz +gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/" + +hg archive -t zip -p /illegal test.zip +hg archive -t zip -p very/../bad test.zip + +hg archive -t zip -r 2 test.zip +unzip -t test.zip diff --git a/tests/test-archive.out b/tests/test-archive.out --- a/tests/test-archive.out +++ b/tests/test-archive.out @@ -1,14 +1,35 @@ adding foo adding bar adding baz/bletch +test-archive-TIP/.hg_archival.txt test-archive-TIP/bar test-archive-TIP/baz/bletch test-archive-TIP/foo +test-archive-TIP/.hg_archival.txt test-archive-TIP/bar test-archive-TIP/baz/bletch test-archive-TIP/foo Archive: archive.zip + testing: test-archive-TIP/.hg_archival.txt OK testing: test-archive-TIP/bar OK testing: test-archive-TIP/baz/bletch OK testing: test-archive-TIP/foo OK No errors detected in compressed data of archive.zip. +test/.hg_archival.txt +test/bar +test/baz/bletch +test/foo +test/.hg_archival.txt +test/bar +test/foo +test-TIP/.hg_archival.txt +test-TIP/bar +test-TIP/baz/bletch +test-TIP/foo +abort: archive prefix contains illegal components +Archive: test.zip + testing: test/.hg_archival.txt OK + testing: test/bar OK + testing: test/baz/bletch OK + testing: test/foo OK +No errors detected in compressed data of test.zip. diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -41,6 +41,7 @@ list of commands (use "hg help -v" to sh add add the specified files on the next commit addremove add all new files, delete all missing files annotate show changeset information per file line + archive create unversioned archive of a repository revision bundle create a changegroup file cat output the latest or given revisions of files clone make a copy of an existing repository @@ -83,6 +84,7 @@ list of commands (use "hg help -v" to sh add add the specified files on the next commit addremove add all new files, delete all missing files annotate show changeset information per file line + archive create unversioned archive of a repository revision bundle create a changegroup file cat output the latest or given revisions of files clone make a copy of an existing repository