threads / patch / 22894

patcht9119-git-svn-info.sh: test with svn 1.6.* as well

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

## tl;dr

5 messages between Mar 3, 2010 and Mar 4, 2010. Diffs are folded; open one to read it.

replies: 4people: 2as markdown or json

Michael J Gruber· Mar 3, 2010, 17:08 UTC · lore

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(-)
Show changes to t/t9119-git-svn-info.sh +3 −2
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· Mar 3, 2010, 20:34 UTC · re: Michael J Gruber · lore

[PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*

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(-)
Eric Wong· Mar 4, 2010, 09:47 UTC · re: Michael J Gruber · lore

Re: [PATCHv2 0/2] Make t9119-git-svn-info.sh run with svn 1.6.*

Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 13 quoted lines
> 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
Michael J Gruber· Mar 3, 2010, 20:34 UTC · re: Michael J Gruber · lore

[PATCHv2 1/2] git-svn: req_svn when needed

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(-)
Show changes to git-svn.perl +1 −0
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· Mar 3, 2010, 20:34 UTC · re: Michael J Gruber · lore

[PATCHv2 2/2] t9119-git-svn-info.sh: test with svn 1.6.* as well

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(-)
Show changes to t/t9119-git-svn-info.sh +2 −1
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

← back to recent threads