Skip to contentSkip to conversation

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

PATCH New Michael J Gruber 2 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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].*. 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].*.

---
 t/t9119-git-svn-info.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
t/t9119-git-svn-info.sh +3 -2
index 95741cb..eff4ae2 100755
@@ -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
Signature · 1 line
1.7.0.1.241.g6604f
#1 lore raw

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

---
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
git-svn.perl +1 -0
index b7c03b6..bae7231 100755
@@ -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";
Signature · 1 line
1.7.0.1.241.g6604f
#2 lore raw

PATCH v2 2/2 t9119-git-svn-info.sh: test with svn 1.6.* as well

In reply to Michael J Gruber

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

---
 t/t9119-git-svn-info.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
t/t9119-git-svn-info.sh +2 -1
index 95741cb..a9a558d 100755
@@ -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)"
Signature · 1 line
1.7.0.1.241.g6604f
#3 lore raw

v2 cover Make t9119-git-svn-info.sh run with svn 1.6.*

In reply to Michael J Gruber

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(-)
#4 lore raw

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

Quoted 6 lines · Michael J Gruber

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

Quoted 7 lines

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

Signature · 1 line
Eric Wong