# [PATCH] t9119-git-svn-info.sh: test with svn 1.6.* as well

5 messages from 2010-03-03 to 2010-03-04. Participants: Michael J Gruber, Eric Wong.
Thread: https://gitlist.dev/t/22894

## Michael J Gruber, 2010-03-03 17:08

Subject: [PATCH] t9119-git-svn-info.sh: test with svn 1.6.* as well
Message-ID: <d16ad252f24db9274bc9a5bcab959524eab823ed.1267636051.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/d16ad252f24db9274bc9a5bcab959524eab823ed.1267636051.git.git%40drmicha.warpmail.net

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

```

## Michael J Gruber, 2010-03-03 20:34

Subject: [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*
Message-ID: <cover.1267647872.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/cover.1267647872.git.git%40drmicha.warpmail.net
In-Reply-To: <d16ad252f24db9274bc9a5bcab959524eab823ed.1267636051.git.git@drmicha.warpmail.net>

```
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(-)

```

## Michael J Gruber, 2010-03-03 20:34

Subject: [PATCHv2 1/2] git-svn: req_svn when needed
Message-ID: <53df75af0e7fa5a456b326652147840b07f0d53a.1267647872.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/53df75af0e7fa5a456b326652147840b07f0d53a.1267647872.git.git%40drmicha.warpmail.net
In-Reply-To: <d16ad252f24db9274bc9a5bcab959524eab823ed.1267636051.git.git@drmicha.warpmail.net>

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

```

## Michael J Gruber, 2010-03-03 20:34

Subject: [PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well
Message-ID: <934da657767ac16dc137f68783769505f6b082fb.1267647872.git.git@drmicha.warpmail.net>
URL: https://gitlist.dev/e/934da657767ac16dc137f68783769505f6b082fb.1267647872.git.git%40drmicha.warpmail.net
In-Reply-To: <d16ad252f24db9274bc9a5bcab959524eab823ed.1267636051.git.git@drmicha.warpmail.net>

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

```

## Eric Wong, 2010-03-04 09:47

Subject: Re: [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*
Message-ID: <20100304094708.GA12885@dcvr.yhbt.net>
URL: https://gitlist.dev/e/20100304094708.GA12885%40dcvr.yhbt.net
In-Reply-To: <cover.1267647872.git.git@drmicha.warpmail.net>

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

```
