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

[PATCH v2 8/6] t9600: adjust for new cvsimport

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2013, 07:52 UTC
Message-ID
<7vip70fbh8.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<1358148351-31552-1-git-send-email-gitster@pobox.com>

The rewritten cvsimport does not skip the latest 10 minutes worth of CVS commits by default, so there is no need to pass the "-a" option; it will barf if it sees "-a".

Also it will do the merge itself, so there is no need to merge "origin" ourselves, either.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 * This is still untested and primarily to illustrate the concept
   introduced by the 5/6 patch, together with 6/6.  Testing by
   interested parties with a working cvsps 3 may be nice.  Something
   like:
    $ make CVSPS3_PATH=/path/to/your/cvsps3/bin/cvsps
    $ cd t && sh t9650-cvsimport3.sh
 t/t9600-cvsimport.sh | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 906cbdc..7b5a9a0 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -42,9 +42,13 @@ EOF
 	)
 '
 
-test_expect_success 'import a trivial module' '
+case "$TEST_CVSPS_VERSION" in
+3)	import_all= ;;
+*)	import_all=-a ;;
+esac &&
 
-	git cvsimport -a -R -z 0 -C module-git module &&
+test_expect_success 'import a trivial module' '
+	git cvsimport $import_all -R -z 0 -C module-git module &&
 	test_cmp module-cvs/o_fortuna module-git/o_fortuna
 
 '
@@ -90,8 +94,11 @@ test_expect_success 'update git module' '
 
 	(cd module-git &&
 	git config cvsimport.trackRevisions true &&
-	git cvsimport -a -z 0 module &&
-	git merge origin
+	git cvsimport $import_all -z 0 module &&
+	if test "$TEST_CVSPS_VERSION" = 2
+	then
+		git merge origin
+	fi
 	) &&
 	test_cmp module-cvs/o_fortuna module-git/o_fortuna
 
@@ -119,8 +126,11 @@ test_expect_success 'cvsimport.module config works' '
 	(cd module-git &&
 		git config cvsimport.module module &&
 		git config cvsimport.trackRevisions true &&
-		git cvsimport -a -z0 &&
-		git merge origin
+		git cvsimport $import_all -z0 &&
+		if test "$TEST_CVSPS_VERSION" = 2
+		then
+			git merge origin
+		fi
 	) &&
 	test_cmp module-cvs/tick module-git/tick
 
@@ -140,7 +150,7 @@ test_expect_success 'import from a CVS working tree' '
 	$CVS co -d import-from-wt module &&
 	(cd import-from-wt &&
 		git config cvsimport.trackRevisions false &&
-		git cvsimport -a -z0 &&
+		git cvsimport $import_all -z0 &&
 		echo 1 >expect &&
 		git log -1 --pretty=format:%s%n >actual &&
 		test_cmp actual expect
-- 
1.8.1.421.g6236851
Previous: Junio C Hamano
Message 37 of 37 in “cvsimport: rewrite to use cvsps 3.x to fix major bugs”
  1. cvsimport: rewrite to use cvsps 3.x to fix major bugsJunio C Hamano, Jan 11, 2013
  2. Junio C HamanoJan 11, 2013
  3. Eric S. RaymondJan 11, 2013
  4. Junio C HamanoJan 11, 2013
  5. Junio C HamanoJan 11, 2013
  6. Eric S. RaymondJan 12, 2013
  7. Junio C HamanoJan 12, 2013
  8. t/t960[123]: remove leftover scriptsJunio C Hamano, Jan 12, 2013
  9. Chris RorvickJan 12, 2013
  10. t/lib-cvs: cvsimport no longer works without Python >= 2.7Junio C Hamano, Jan 12, 2013
  11. Michael HaggertyJan 12, 2013
  12. John KeepingJan 13, 2013
  13. Eric S. RaymondJan 12, 2013
  14. Michael HaggertyJan 12, 2013
  15. Eric S. RaymondJan 12, 2013
  16. Jonathan NiederJan 12, 2013
  17. Jonathan NiederJan 12, 2013
  18. Junio C HamanoJan 13, 2013
  19. Junio C HamanoJan 13, 2013
  20. 0/3 A smoother transition plan for cvsimportJunio C Hamano, Jan 14, 2013
  21. 1/3 cvsimport: allow setting a custom cvsps (2.x) program nameJunio C Hamano, Jan 14, 2013
  22. 2/3 cvsimport: introduce a version-switch wrapperJunio C Hamano, Jan 14, 2013
  23. Junio C HamanoJan 14, 2013
  24. 3/3 cvsimport: start adding cvsps 3.x supportJunio C Hamano, Jan 14, 2013
  25. Chris RorvickJan 15, 2013
  26. Junio C HamanoJan 15, 2013
  27. Michael HaggertyJan 14, 2013
  28. 0/6 A smoother transition plan for cvsimportJunio C Hamano, Jan 14, 2013
  29. 1/6 Makefile: add description on PERL/PYTHON_PATHJunio C Hamano, Jan 14, 2013
  30. 2/6 cvsimport: allow setting a custom cvsps (2.x) program nameJunio C Hamano, Jan 14, 2013
  31. 3/6 cvsimport: introduce a version-switch wrapperJunio C Hamano, Jan 14, 2013
  32. 4/6 cvsimport: start adding cvsps 3.x supportJunio C Hamano, Jan 14, 2013
  33. 5/6 cvsimport: make tests reusable for cvsimport-3Junio C Hamano, Jan 14, 2013
  34. 6/6 cvsimport-3: add a sample testJunio C Hamano, Jan 14, 2013
  35. Jonathan NiederJan 14, 2013
  36. 7/6 t9600: further prepare for sharingJunio C Hamano, Jan 14, 2013
  37. 8/6 t9600: adjust for new cvsimportJunio C Hamano, Jan 14, 2013

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.