git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t9143: do not fail if Compress::Zlib is missing

From
EWEric Wong <normalperson@yhbt.net>
Date
Jul 26, 2009, 10:01 UTC
Message-ID
<20090726100152.GA25775@dcvr.yhbt.net>
In-Reply-To
<7v3a8jsvyu.fsf@alter.siamese.dyndns.org>

"git svn gc" will not compress unhandled.log files if Compress::Zlib is missing. However, leftover index files should always be removed, so add a test for this behavior as well.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
  Junio C Hamano <gitster@pobox.com> wrote:
  > Eric Wong <normalperson@yhbt.net> writes:
  > 
  > >   # I thought I had pushed this out earlier:
  > >   Robert Allan Zeh (1):
  > >         git svn: add gc command
  > 
  > Note that with this commit, the test fails needlessly if Compress::Zlib is
  > not found, even though otherwise "svn gc" succeeds (for some definition of
  > "success")..
  Oops, this test completely slipped my mind even though I caught the
  issue in the original code.  Pushed out to git://git.bogomips.org/git-svn
 t/t9143-git-svn-gc.sh |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh
index aaa3af0..f2ba2d1 100755
--- a/t/t9143-git-svn-gc.sh
+++ b/t/t9143-git-svn-gc.sh
@@ -31,11 +31,20 @@ test_expect_success 'make backup copy of unhandled.log' '
 	 cp .git/svn/git-svn/unhandled.log tmp
 	'
 
+test_expect_success 'create leftover index' '> .git/svn/git-svn/index'
+
 test_expect_success 'git svn gc runs' 'git svn gc'
 
-test_expect_success 'git svn gc produces a valid gzip file' '
-	 gunzip .git/svn/git-svn/unhandled.log.gz
-	'
+test_expect_success 'git svn index removed' '! test -f .git/svn/git-svn/index'
+
+if perl -MCompress::Zlib -e 0 2>/dev/null
+then
+	test_expect_success 'git svn gc produces a valid gzip file' '
+		 gunzip .git/svn/git-svn/unhandled.log.gz
+		'
+else
+	say "Perl Compress::Zlib unavailable, skipping gunzip test"
+fi
 
 test_expect_success 'git svn gc does not change unhandled.log files' '
 	 test_cmp .git/svn/git-svn/unhandled.log tmp/unhandled.log
-- 
Eric Wong
Previous: Junio C HamanoNext: Mattias Nissler
Message 8 of 12 in “[ANNOUNCE] GIT 1.6.4-rc2”
  1. Junio C HamanoJul 23, 2009
  2. Tony FinchJul 23, 2009
  3. Eric WongJul 24, 2009
  4. Junio C HamanoJul 24, 2009
  5. Eric WongJul 25, 2009
  6. 2/2 git svn: the branch command no longer needs the full pathEric Wong, Jul 25, 2009
  7. Junio C HamanoJul 26, 2009
  8. t9143: do not fail if Compress::Zlib is missingEric Wong, Jul 26, 2009
  9. Mattias NisslerJul 25, 2009
  10. Eric WongJul 25, 2009
  11. Mattias NisslerJul 25, 2009
  12. git svn: make minimize URL more reliable over http(s)Eric Wong, Jul 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.