All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] t9119-git-svn-info.sh: test with svn 1.6.* as well
@ 2010-03-03 17:08 Michael J Gruber
  2010-03-03 20:34 ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Michael J Gruber
  0 siblings, 1 reply; 5+ messages in thread
From: Michael J Gruber @ 2010-03-03 17:08 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

All tests in t9119 were disabled for subversion versions other than
1.[45].*. Adjust the single test where svn 1.6.* output is slightly
different to ignore the differing line, and make the test script
run with subversion 1.[456].*.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t9119-git-svn-info.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh
index 95741cb..eff4ae2 100755
--- a/t/t9119-git-svn-info.sh
+++ b/t/t9119-git-svn-info.sh
@@ -7,9 +7,10 @@ test_description='git svn info'
 . ./lib-git-svn.sh
 
 # Tested with: svn, version 1.4.4 (r25188)
+# Tested with: svn, version 1.6.[12345689]
 v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'`
 case $v in
-1.[45].*)
+1.[456].*)
 	;;
 *)
 	say "skipping svn-info test (SVN version: $v not supported)"
@@ -166,7 +167,7 @@ test_expect_success 'info added-directory' "
 		git add added-directory &&
 	cd .. &&
 	(cd svnwc; svn info added-directory) \
-		> expected.info-added-directory &&
+		| grep -v \"Repository UUID\" > expected.info-added-directory &&
 	(cd gitwc; git svn info added-directory) \
 		> actual.info-added-directory &&
 	test_cmp expected.info-added-directory actual.info-added-directory
-- 
1.7.0.1.241.g6604f

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*
  2010-03-03 17:08 [PATCH] t9119-git-svn-info.sh: test with svn 1.6.* as well Michael J Gruber
@ 2010-03-03 20:34 ` Michael J Gruber
  2010-03-03 20:34   ` [PATCHv2 1/2] git-svn: req_svn when needed Michael J Gruber
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael J Gruber @ 2010-03-03 20:34 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, Junio C Hamano

I'm sorry my previous analysis was wrong. In fact, since the delayed
loading of SVN::Core, git-svn's cmd_info would guess the wrong svn version
because it uses SVN::Core without loading it (leading to an empty version string).

After fixing this, the test runs unmodified, so enbale it for 1.6.*.

Michael J Gruber (2):
  git-svn: req_svn when needed
  t9119-git-svn-info.sh: test with svn 1.6.* as well

 git-svn.perl            |    1 +
 t/t9119-git-svn-info.sh |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 1/2] git-svn: req_svn when needed
  2010-03-03 20:34 ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Michael J Gruber
@ 2010-03-03 20:34   ` Michael J Gruber
  2010-03-03 20:34   ` [PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well Michael J Gruber
  2010-03-04  9:47   ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Eric Wong
  2 siblings, 0 replies; 5+ messages in thread
From: Michael J Gruber @ 2010-03-03 20:34 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, Junio C Hamano

The delayed loading of SVN missed a place where SVN::Core is used. Make
sure to load the package before trying to use it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index b7c03b6..bae7231 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1102,6 +1102,7 @@ sub cmd_info {
 	if ($@) {
 		$result .= "Repository Root: (offline)\n";
 	}
+	::_req_svn();
 	$result .= "Repository UUID: $uuid\n" unless $diff_status eq "A" &&
 		($SVN::Core::VERSION le '1.5.4' || $file_type ne "dir");
 	$result .= "Revision: " . ($diff_status eq "A" ? 0 : $rev) . "\n";
-- 
1.7.0.1.241.g6604f

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well
  2010-03-03 20:34 ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Michael J Gruber
  2010-03-03 20:34   ` [PATCHv2 1/2] git-svn: req_svn when needed Michael J Gruber
@ 2010-03-03 20:34   ` Michael J Gruber
  2010-03-04  9:47   ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Eric Wong
  2 siblings, 0 replies; 5+ messages in thread
From: Michael J Gruber @ 2010-03-03 20:34 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, Junio C Hamano

All tests in t9119 were disabled for subversion versions other than
1.[45].*. Make the test script run with subversion 1.[456].*.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t9119-git-svn-info.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t9119-git-svn-info.sh b/t/t9119-git-svn-info.sh
index 95741cb..a9a558d 100755
--- a/t/t9119-git-svn-info.sh
+++ b/t/t9119-git-svn-info.sh
@@ -7,9 +7,10 @@ test_description='git svn info'
 . ./lib-git-svn.sh
 
 # Tested with: svn, version 1.4.4 (r25188)
+# Tested with: svn, version 1.6.[12345689]
 v=`svn_cmd --version | sed -n -e 's/^svn, version \(1\.[0-9]*\.[0-9]*\).*$/\1/p'`
 case $v in
-1.[45].*)
+1.[456].*)
 	;;
 *)
 	say "skipping svn-info test (SVN version: $v not supported)"
-- 
1.7.0.1.241.g6604f

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*
  2010-03-03 20:34 ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Michael J Gruber
  2010-03-03 20:34   ` [PATCHv2 1/2] git-svn: req_svn when needed Michael J Gruber
  2010-03-03 20:34   ` [PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well Michael J Gruber
@ 2010-03-04  9:47   ` Eric Wong
  2 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2010-03-04  9:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Michael J Gruber

Michael J Gruber <git@drmicha.warpmail.net> wrote:
> I'm sorry my previous analysis was wrong. In fact, since the delayed
> loading of SVN::Core, git-svn's cmd_info would guess the wrong svn version
> because it uses SVN::Core without loading it (leading to an empty version string).
> 
> After fixing this, the test runs unmodified, so enbale it for 1.6.*.
> 
> Michael J Gruber (2):
>   git-svn: req_svn when needed
>   t9119-git-svn-info.sh: test with svn 1.6.* as well
> 
>  git-svn.perl            |    1 +
>  t/t9119-git-svn-info.sh |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletions(-)

Thanks Michael,

Acked and pushed out to: git://git.bogomips.org/git-svn.git

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-04  9:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 17:08 [PATCH] t9119-git-svn-info.sh: test with svn 1.6.* as well Michael J Gruber
2010-03-03 20:34 ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Michael J Gruber
2010-03-03 20:34   ` [PATCHv2 1/2] git-svn: req_svn when needed Michael J Gruber
2010-03-03 20:34   ` [PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well Michael J Gruber
2010-03-04  9:47   ` [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.* Eric Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.