threads / patch / 32604

v2, 3 partsfixup remaining cvsimport tests

Subject: [PATCH v2 0/3] fixup remaining cvsimport tests

## tl;dr

6 messages between Jan 12, 2013 and Jan 12, 2013. Diffs are folded; open one to read it.

replies: 5people: 2as markdown or json

Chris Rorvick· Jan 12, 2013, 06:21 UTC · lore
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(-)
-- 
1.8.1.rc3.335.g88a67d6
Chris Rorvick· Jan 12, 2013, 06:21 UTC · re: Chris Rorvick · lore

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

Signed-off-by: Chris Rorvick <chris@rorvick.com>
---
 t/lib-cvs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/lib-cvs.sh +1 −1
diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh
index 44263ad..b55e861 100644
--- a/t/lib-cvs.sh
+++ b/t/lib-cvs.sh
@@ -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'
-- 
1.8.1.rc3.335.g88a67d6
Chris Rorvick· Jan 12, 2013, 06:21 UTC · re: Chris Rorvick · lore

[PATCH v2 2/3] t9600: fixup for new cvsimport

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

Signed-off-by: Chris Rorvick <chris@rorvick.com>
---
 t/t9600-cvsimport.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Show changes to t/t9600-cvsimport.sh +4 −6
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 4c384ff..14f54d5 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -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
-- 
1.8.1.rc3.335.g88a67d6
Chris Rorvick· Jan 12, 2013, 06:21 UTC · re: Chris Rorvick · lore

[PATCH v2 3/3] t9604: fixup for new cvsimport

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

Signed-off-by: Chris Rorvick <chris@rorvick.com>
---
 t/t9604-cvsimport-timestamps.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Show changes to t/t9604-cvsimport-timestamps.sh +2 −3
diff --git a/t/t9604-cvsimport-timestamps.sh b/t/t9604-cvsimport-timestamps.sh
index 1fd5142..b1629b6 100755
--- a/t/t9604-cvsimport-timestamps.sh
+++ b/t/t9604-cvsimport-timestamps.sh
@@ -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 <user3@domain.org> EST5EDT
 	user4=User Four <user4@domain.org> 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"
-- 
1.8.1.rc3.335.g88a67d6
Junio C Hamano· Jan 12, 2013, 06:36 UTC · re: Chris Rorvick · lore

Re: [PATCH v2 0/3] fixup remaining cvsimport tests

Chris Rorvick <chris@rorvick.com> writes:
Show 11 quoted lines
> 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.

Chris Rorvick· Jan 12, 2013, 07:01 UTC · re: Junio C Hamano · lore

Re: [PATCH v2 0/3] fixup remaining cvsimport tests

On Sat, Jan 12, 2013 at 12:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> 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.

> 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.

← back to recent threads