Skip to contentSkip to conversation

fixup remaining cvsimport tests

PATCH In review Chris Rorvick 2 participants 6 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover fixup remaining cvsimport tests

Reroll w/ sign-off.

Chris Rorvick (3):
t/lib-cvs.sh: allow cvsps version 3.x.
t9600: fixup for new cvsimport
t9604: fixup for new cvsimport

 t/lib-cvs.sh                    |  2 +-
 t/t9600-cvsimport.sh            | 10 ++++------
 t/t9604-cvsimport-timestamps.sh |  5 ++---
 3 files changed, 7 insertions(+), 10 deletions(-)
Signature · 1 line
1.8.1.rc3.335.g88a67d6
#1 lore raw

PATCH v2 1/3 t/lib-cvs.sh: allow cvsps version 3.x.

---
 t/lib-cvs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/lib-cvs.sh +1 -1
index 44263ad..b55e861 100644
@@ -15,7 +15,7 @@ export CVS
 
 cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version //p'`
 case "$cvsps_version" in
-2.1 | 2.2*)
+2.1 | 2.2* | 3.*)
 	;;
 '')
 	skip_all='skipping cvsimport tests, cvsps not found'
Signature · 1 line
1.8.1.rc3.335.g88a67d6
#2 lore raw

PATCH v2 2/3 t9600: fixup for new cvsimport

In reply to Chris Rorvick

cvsimport no longer supports -a (import all commits including recent ones) and no longer uses the 'origin' branch by default for imports.

---
 t/t9600-cvsimport.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
t/t9600-cvsimport.sh +4 -6
index 4c384ff..14f54d5 100755
@@ -44,7 +44,7 @@ EOF
 
 test_expect_success PERL 'import a trivial module' '
 
-	git cvsimport -a -R -z 0 -C module-git module &&
+	git cvsimport -R -z 0 -C module-git module &&
 	test_cmp module-cvs/o_fortuna module-git/o_fortuna
 
 '
@@ -90,8 +90,7 @@ test_expect_success PERL 'update git module' '
 
 	(cd module-git &&
 	git config cvsimport.trackRevisions true &&
-	git cvsimport -a -z 0 module &&
-	git merge origin
+	git cvsimport -z 0 module
 	) &&
 	test_cmp module-cvs/o_fortuna module-git/o_fortuna
 
@@ -119,8 +118,7 @@ test_expect_success PERL '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 -z0
 	) &&
 	test_cmp module-cvs/tick module-git/tick
 
@@ -140,7 +138,7 @@ test_expect_success PERL '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 -z0 &&
 		echo 1 >expect &&
 		git log -1 --pretty=format:%s%n >actual &&
 		test_cmp actual expect
Signature · 1 line
1.8.1.rc3.335.g88a67d6
#3 lore raw

PATCH v2 3/3 t9604: fixup for new cvsimport

In reply to Chris Rorvick

cvsps no longer writes a cache file and therefore no longer can be told to ignore it with -x.

---
 t/t9604-cvsimport-timestamps.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
t/t9604-cvsimport-timestamps.sh +2 -3
index 1fd5142..b1629b6 100755
@@ -7,8 +7,7 @@ setup_cvs_test_repository t9604
 
 test_expect_success 'check timestamps are UTC (TZ=CST6CDT)' '
 
-	TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
-	git cvsimport -p"-x" -C module-1 module &&
+	TZ=CST6CDT git cvsimport -C module-1 module &&
 	(
 		cd module-1 &&
 		git log --format="%s %ai"
@@ -42,7 +41,7 @@ test_expect_success 'check timestamps with author-specific timezones' '
 	user3=User Three <[email protected]> EST5EDT
 	user4=User Four <[email protected]> MST7MDT
 	EOF
-	git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
+	git cvsimport -A cvs-authors -C module-2 module &&
 	(
 		cd module-2 &&
 		git log --format="%s %ai %an"
Signature · 1 line
1.8.1.rc3.335.g88a67d6
#4 lore raw
In reply to Chris Rorvick
Quoted 11 lines · Chris Rorvick

Reroll w/ sign-off.

Chris Rorvick (3):
t/lib-cvs.sh: allow cvsps version 3.x.
t9600: fixup for new cvsimport
t9604: fixup for new cvsimport

 t/lib-cvs.sh                    |  2 +-
 t/t9600-cvsimport.sh            | 10 ++++------
 t/t9604-cvsimport-timestamps.sh |  5 ++---
 3 files changed, 7 insertions(+), 10 deletions(-)

Thanks.

I too noticed the droppage of "-a" support, which may not be a big deal (people can drop it from their script, run cvsimport and they can drop newer commits from the resulting Git history to emulate the old behaviour without "-a" that attempted to find a quiescent point if they really want to and suspect that the upstream CVS repository was not quiescent during the import).

Likewise for "-x". You said "no longer can be told" and that is technically true, but it is more like "no longer need to be told, as stale cache cannot get in the way", so it is probably not a big deal, either, for people to drop it from their script.

About the changed behaviour regarding "origin", I suspect that it is a change for the better, but we would probably need documentation updates to cover it (and deleted options and (mis)features) before this topic graduates.

#5 lore raw
Quoted 6 lines · Junio C Hamano

I too noticed the droppage of "-a" support, which may not be a big deal (people can drop it from their script, run cvsimport and they can drop newer commits from the resulting Git history to emulate the old behaviour without "-a" that attempted to find a quiescent point if they really want to and suspect that the upstream CVS repository was not quiescent during the import).

Is there any value to -a when fuzz is exposed (-z)? I mean this is a functional sense. I think there is a lot of value to maintaining the interfaces of both cvsimport and cvsps where possible.

Quoted 4 lines

Likewise for "-x". You said "no longer can be told" and that is technically true, but it is more like "no longer need to be told, as stale cache cannot get in the way", so it is probably not a big deal, either, for people to drop it from their script.

:-) I originally wrote "need" and then changed it to be clearer on why it was being removed.