[RFC/PATCH] t9157-*.sh: Add an svn version check

Subsystems: the rest

9 messages, 5 authors, 2016-06-15 · open the first message on its own page

[RFC/PATCH] t9157-*.sh: Add an svn version check

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:50:20

Signed-off-by: Ramsay Jones <redacted>
---

This test fails for me, because my svn version(s) are too old (1.4.3 and 1.4.6), and
so I've got into the habit of running the tests with NO_SVN_TESTS=1. (which is a bit
of a shame in terms of test coverage, but it is *much* quicker!)

I don't know the details, but it seems that the 'svn merge' of this vintage does not
support the operations required by this test. Unfortunately, I don't know what the
minimum required version of svn is, so I'm hoping that someone can take this patch
and fix it up properly ...

ATB,
Ramsay Jones

 t/t9157-git-svn-fetch-merge.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh
index da582c5..accf61e 100755
--- a/t/t9157-git-svn-fetch-merge.sh
+++ b/t/t9157-git-svn-fetch-merge.sh
@@ -6,6 +6,14 @@
 test_description='git svn merge detection'
 . ./lib-git-svn.sh
 
+svn_ver="$(svn --version --quiet)"
+case $svn_ver in
+[0-1].[0-4].[0-6])
+	skip_all="skipping git-svn test - SVN too old ($svn_ver)"
+	test_done
+	;;
+esac
+
 test_expect_success 'initialize source svn repo' '
 	svn_cmd mkdir -m x "$svnrepo"/trunk &&
 	svn_cmd mkdir -m x "$svnrepo"/branches &&
-- 
1.7.3

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Eric Wong <hidden>
Date: 2016-06-15 22:50:21

Ramsay Jones [off-list ref] wrote:
Signed-off-by: Ramsay Jones <redacted> ---

This test fails for me, because my svn version(s) are too old (1.4.3
and 1.4.6), and so I've got into the habit of running the tests with
NO_SVN_TESTS=1. (which is a bit of a shame in terms of test coverage,
but it is *much* quicker!)

I don't know the details, but it seems that the 'svn merge' of this
vintage does not support the operations required by this test.
Unfortunately, I don't know what the minimum required version of svn
is, so I'm hoping that someone can take this patch and fix it up
properly ...
I'm fine taking this patch as-is or even making it just apply to all
1.4.x versions.  1.5+ has been out for ages now and eventually the rest
of the world will just upgrade.

Consider this
Acked-by: Eric Wong <redacted>

-- 
Eric Wong

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Steven Walter <hidden>
Date: 2016-06-15 22:50:21

On Fri, Jan 7, 2011 at 12:31 PM, Eric Wong [off-list ref] wrote:
Ramsay Jones [off-list ref] wrote:
quoted
Signed-off-by: Ramsay Jones <redacted> ---
Consider this
Acked-by: Eric Wong <redacted>
Acked-by: Steven Walter <redacted>
-- 
-Steven Walter [off-list ref]

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Eric Wong <hidden>
Date: 2016-06-15 22:50:21

Steven Walter [off-list ref] wrote:
On Fri, Jan 7, 2011 at 12:31 PM, Eric Wong [off-list ref] wrote:
quoted
Ramsay Jones [off-list ref] wrote:
quoted
Signed-off-by: Ramsay Jones <redacted> ---
Consider this
Acked-by: Eric Wong <redacted>
Acked-by: Steven Walter <redacted>
Wait, looking through my backlog, this could fix the problem
Ramsay was having but was lost in the shuffle (my fault) :x

Ramsay: does this fix it?
From 9a4f35d6ff9a66b7b5e57c7124a7cd6df0adad7b Mon Sep 17 00:00:00 2001
From: Steven Walter <redacted>
Date: Fri, 22 Oct 2010 21:55:58 -0400
Subject: [PATCH] t9157-git-svn-fetch-merge.sh: remove dependency on subversion 1.5

Specify a revision range to "merge" and manually set the svn:mergeinfo
property.

Acked-by: Eric Wong <redacted>
---
 t/t9157-git-svn-fetch-merge.sh |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh
index da582c5..424e1fa 100755
--- a/t/t9157-git-svn-fetch-merge.sh
+++ b/t/t9157-git-svn-fetch-merge.sh
@@ -25,15 +25,19 @@ test_expect_success 'initialize source svn repo' '
 		svn add baz &&
 		svn commit -m x &&
 		svn switch "$svnrepo"/trunk &&
-		svn merge "$svnrepo"/branches/branch1 &&
+		svn merge -r3:7 "$svnrepo"/branches/branch1 &&
+		svn propset svn:mergeinfo "/branches/branch1:4-7" . &&
 		svn commit -m "merge" &&
 		svn switch "$svnrepo"/branches/branch1 &&
 		svn commit -m x &&
 		svn switch "$svnrepo"/branches/branch2 &&
-		svn merge "$svnrepo"/branches/branch1 &&
+		svn merge -r3:8 "$svnrepo"/branches/branch1 &&
+		svn propset svn:mergeinfo "/branches/branch1:4-8" . &&
 		svn commit -m "merge branch1" &&
 		svn switch "$svnrepo"/trunk &&
-		svn merge "$svnrepo"/branches/branch2 &&
+		svn merge -r5:9 "$svnrepo"/branches/branch2 &&
+		svn propset svn:mergeinfo "/branches/branch1:4-8
+/branches/branch2:6-9" . &&
 		svn resolved baz &&
 		svn commit -m "merge branch2"
 	) &&
-- 
Eric Wong

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:21

Eric Wong wrote:
Wait, looking through my backlog, this could fix the problem
Ramsay was having but was lost in the shuffle (my fault) :x

Ramsay: does this fix it?

From 9a4f35d6ff9a66b7b5e57c7124a7cd6df0adad7b Mon Sep 17 00:00:00 2001
From: Steven Walter <redacted>
Date: Fri, 22 Oct 2010 21:55:58 -0400
Subject: [PATCH] t9157-git-svn-fetch-merge.sh: remove dependency on subversion 1.5
Context, for reference:

  http://thread.gmane.org/gmane.linux.kernel/1052314/focus=161717

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Eric Wong <hidden>
Date: 2016-06-15 22:50:21

Jonathan Nieder [off-list ref] wrote:
Eric Wong wrote:
quoted
Wait, looking through my backlog, this could fix the problem
Ramsay was having but was lost in the shuffle (my fault) :x

Ramsay: does this fix it?

From 9a4f35d6ff9a66b7b5e57c7124a7cd6df0adad7b Mon Sep 17 00:00:00 2001
From: Steven Walter <redacted>
Date: Fri, 22 Oct 2010 21:55:58 -0400
Subject: [PATCH] t9157-git-svn-fetch-merge.sh: remove dependency on subversion 1.5
Context, for reference:

  http://thread.gmane.org/gmane.linux.kernel/1052314/focus=161717
Ah thanks, I completely forgot about that, too :x  I'll take Ramsay's
patch.

-- 
Eric Wong

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Eric Wong <hidden>
Date: 2016-06-15 22:50:21

Steven Walter [off-list ref] wrote:
On Fri, Jan 7, 2011 at 12:31 PM, Eric Wong [off-list ref] wrote:
quoted
Ramsay Jones [off-list ref] wrote:
quoted
Signed-off-by: Ramsay Jones <redacted> ---
Consider this
Acked-by: Eric Wong <redacted>
Acked-by: Steven Walter <redacted>
I've pushed out Ramsay's patch along with a small manpage fix
that was mailed to me privately to git://git.bogomips.org/git-svn.git

Ramsay Allan Jones (1):
      t9157-*.sh: Add an svn version check

StephenB (1):
      git svn: fix the final example in man page

-- 
Eric Wong

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Anders Kaseorg <hidden>
Date: 2016-06-15 22:50:21

On Thu, 2011-01-06 at 18:29 +0000, Ramsay Jones wrote:
+svn_ver="$(svn --version --quiet)"
+case $svn_ver in
+[0-1].[0-4].[0-6])
Thanks for the patch.  Can I suggest the more precise

0.* | 1.[0-4].*)

Anders

Re: [RFC/PATCH] t9157-*.sh: Add an svn version check

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:50:22

Anders Kaseorg wrote:
On Thu, 2011-01-06 at 18:29 +0000, Ramsay Jones wrote:
quoted
+svn_ver="$(svn --version --quiet)"
+case $svn_ver in
+[0-1].[0-4].[0-6])
Thanks for the patch.  Can I suggest the more precise

0.* | 1.[0-4].*)
Heh, yeah that would be more accurate! Thanks. ;-)

Junio, I've attached a fix-up patch below...

ATB,
Ramsay Jones
--- >8 ---
From: Ramsay Jones <redacted>
Date: Mon, 10 Jan 2011 23:21:26 +0000
Subject: [PATCH] t9157-*.sh: Make the svn version check more precise

These tests require an svn version 1.5 or newer to run correctly.
In particular, all 1.4.x versions and earlier are too old, so fix
up the case label regex to cover this range exactly.

[Fix provided by Anders Kaseorg [off-list ref]]

Signed-off-by: Ramsay Jones <redacted>
---
 t/t9157-git-svn-fetch-merge.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh
index accf61e..991d2aa 100755
--- a/t/t9157-git-svn-fetch-merge.sh
+++ b/t/t9157-git-svn-fetch-merge.sh
@@ -8,7 +8,7 @@ test_description='git svn merge detection'
 
 svn_ver="$(svn --version --quiet)"
 case $svn_ver in
-[0-1].[0-4].[0-6])
+0.* | 1.[0-4].*)
 	skip_all="skipping git-svn test - SVN too old ($svn_ver)"
 	test_done
 	;;
-- 
1.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help