git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Minimum required version of subversion for git-svn?
@ 2009-01-09 10:11 Tom G. Christensen
  2009-01-12  1:03 ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Tom G. Christensen @ 2009-01-09 10:11 UTC (permalink / raw)
  To: git

Hello,

With git 1.6.0.5 I was able to run git-svn with subversion 1.1.4 on
RHEL4/i386 but with 1.6.0.6 and 1.6.1 the testsuite now fails in the new
test t9104.10:
* FAIL 10: follow-parent is atomic

                 (
                         cd wc &&
                         svn up &&
                         svn mkdir stunk &&
                         echo "trunk stunk" > stunk/readme &&
                         svn add stunk/readme &&
                         svn ci -m "trunk stunk" &&
                         echo "stunk like junk" >> stunk/readme &&
                         svn ci -m "really stunk" &&
                         echo "stink stank stunk" >> stunk/readme &&
                         svn ci -m "even the grinch agrees"
                 ) &&
                 svn copy -m "stunk flunked" "$svnrepo"/stunk
"$svnrepo"/flunk &&
                 { svn cp -m "early stunk flunked too" \
                         "$svnrepo"/stunk@17 "$svnrepo"/flunked ||
                 svn cp -m "early stunk flunked too" \
                         -r17 "$svnrepo"/stunk "$svnrepo"/flunked; } &&
                 git svn init --minimize-url -i stunk "$svnrepo"/stunk &&
                 git svn fetch -i stunk &&
                 git update-ref refs/remotes/flunk@18
refs/remotes/stunk~2 &&
                 git update-ref -d refs/remotes/stunk &&
                 git config --unset svn-remote.svn.fetch stunk &&
                 mkdir -p "$GIT_DIR"/svn/flunk@18 &&
                 rev_map=$(cd "$GIT_DIR"/svn/stunk && ls .rev_map*) &&
                 dd if="$GIT_DIR"/svn/stunk/$rev_map \
                    of="$GIT_DIR"/svn/flunk@18/$rev_map bs=24 count=1 &&
                 rm -rf "$GIT_DIR"/svn/stunk &&
                 git svn init --minimize-url -i flunk "$svnrepo"/flunk &&
                 git svn fetch -i flunk &&
                 git svn init --minimize-url -i stunk "$svnrepo"/stunk &&
                 git svn fetch -i stunk &&
                 git svn init --minimize-url -i flunked
"$svnrepo"/flunked &&
                 git svn fetch -i flunked
                 test "`git rev-parse --verify refs/remotes/flunk@18`" \
                    = "`git rev-parse --verify refs/remotes/stunk`" &&
                 test "`git rev-parse --verify refs/remotes/flunk~1`" \
                    = "`git rev-parse --verify refs/remotes/stunk`" &&
                 test "`git rev-parse --verify refs/remotes/flunked~1`" \
                    = "`git rev-parse --verify refs/remotes/stunk~1`"


With 1.6.1 I also see t9129.10-12 failing with subversion 1.1.4:
* FAIL 10: ISO-8859-1 should match UTF-8 in svn

                 (
                         cd ISO-8859-1 &&
                         compare_svn_head_with
"$TEST_DIRECTORY"/t3900/1-UTF-8.txt
                 )

* FAIL 11: $H should match UTF-8 in svn

                         (
                                 cd $H &&
                                 compare_svn_head_with
"$TEST_DIRECTORY"/t3900/2-UTF-8.txt
                         )

* FAIL 12: $H should match UTF-8 in svn

                         (
                                 cd $H &&
                                 compare_svn_head_with
"$TEST_DIRECTORY"/t3900/2-UTF-8.txt
                         )

* failed 3 among 12 test(s)
make[2]: Leaving directory `/builddir/build/BUILD/git-1.6.1/t'
make[2]: *** [t9129-git-svn-i18n-commitencoding.sh] Error 1

I see in git-svn.perl that only SVN::Core 1.1.0 is required. Is it still
the intention that git-svn should work with subversion 1.1.x?

If you're going to bump the minimum requirement I would ask that you
atleast keep 1.3.x as supported. This is the last release of subversion
where RHEL3 can satisfy the dependencies out of the box and I've
verified that the testsuite will pass with 1.3.2.

-tgc

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

* Re: Minimum required version of subversion for git-svn?
  2009-01-09 10:11 Minimum required version of subversion for git-svn? Tom G. Christensen
@ 2009-01-12  1:03 ` Eric Wong
  2009-01-12  8:03   ` Tom G. Christensen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Wong @ 2009-01-12  1:03 UTC (permalink / raw)
  To: Tom G. Christensen; +Cc: git

"Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
> Hello,
>
> With git 1.6.0.5 I was able to run git-svn with subversion 1.1.4 on
> RHEL4/i386 but with 1.6.0.6 and 1.6.1 the testsuite now fails in the new
> test t9104.10:

...

> With 1.6.1 I also see t9129.10-12 failing with subversion 1.1.4:
> * FAIL 10: ISO-8859-1 should match UTF-8 in svn

...

> * failed 3 among 12 test(s)
> make[2]: Leaving directory `/builddir/build/BUILD/git-1.6.1/t'
> make[2]: *** [t9129-git-svn-i18n-commitencoding.sh] Error 1
>
> I see in git-svn.perl that only SVN::Core 1.1.0 is required. Is it still
> the intention that git-svn should work with subversion 1.1.x?
>
> If you're going to bump the minimum requirement I would ask that you
> atleast keep 1.3.x as supported. This is the last release of subversion
> where RHEL3 can satisfy the dependencies out of the box and I've
> verified that the testsuite will pass with 1.3.2.

It's still my intention that SVN 1.1.x is supported; but I haven't had
the chance to test those versions in a while.

Can you rerun the tests that failed with "sh -x t91..." ?

Thanks.

-- 
Eric Wong

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

* Re: Minimum required version of subversion for git-svn?
  2009-01-12  1:03 ` Eric Wong
@ 2009-01-12  8:03   ` Tom G. Christensen
  2009-01-17 10:58     ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Tom G. Christensen @ 2009-01-12  8:03 UTC (permalink / raw)
  To: Eric Wong; +Cc: git@vger.kernel.org

Eric Wong wrote:
> "Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
>> Hello,
>>
>> With git 1.6.0.5 I was able to run git-svn with subversion 1.1.4 on
>> RHEL4/i386 but with 1.6.0.6 and 1.6.1 the testsuite now fails in the new
>> test t9104.10:
> 
> ...
> 
>> With 1.6.1 I also see t9129.10-12 failing with subversion 1.1.4:
>> * FAIL 10: ISO-8859-1 should match UTF-8 in svn
> 
> ...
> 
>> * failed 3 among 12 test(s)
>> make[2]: Leaving directory `/builddir/build/BUILD/git-1.6.1/t'
>> make[2]: *** [t9129-git-svn-i18n-commitencoding.sh] Error 1
>>
>> I see in git-svn.perl that only SVN::Core 1.1.0 is required. Is it still
>> the intention that git-svn should work with subversion 1.1.x?
>>
>> If you're going to bump the minimum requirement I would ask that you
>> atleast keep 1.3.x as supported. This is the last release of subversion
>> where RHEL3 can satisfy the dependencies out of the box and I've
>> verified that the testsuite will pass with 1.3.2.
> 
> It's still my intention that SVN 1.1.x is supported; but I haven't had
> the chance to test those versions in a while.
> 
> Can you rerun the tests that failed with "sh -x t91..." ?
> 
I've run the tests from 1.6.1 with -v, sh -x and sh -x + -v and dumped 
the results at http://jupiterrise.com/tmp

You'll find results from one more test (t9106) which I didn't mention 
and which is also giving me problems but only with rhel4/x86_64 and svn 
1.1.4. It should be noted that this test has never worked for me with 
this config.

-tgc

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

* Re: Minimum required version of subversion for git-svn?
  2009-01-12  8:03   ` Tom G. Christensen
@ 2009-01-17 10:58     ` Eric Wong
  2009-01-19  0:45       ` [PATCH] git-svn: fix SVN 1.1.x compatibility Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Wong @ 2009-01-17 10:58 UTC (permalink / raw)
  To: Tom G. Christensen; +Cc: git@vger.kernel.org

"Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
> Eric Wong wrote:
>> "Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
>>> Hello,
>>>
>>> With git 1.6.0.5 I was able to run git-svn with subversion 1.1.4 on
>>> RHEL4/i386 but with 1.6.0.6 and 1.6.1 the testsuite now fails in the new
>>> test t9104.10:
>>
>> ...
>>
>>> With 1.6.1 I also see t9129.10-12 failing with subversion 1.1.4:
>>> * FAIL 10: ISO-8859-1 should match UTF-8 in svn
>>
>> ...
>>
>>> * failed 3 among 12 test(s)
>>> make[2]: Leaving directory `/builddir/build/BUILD/git-1.6.1/t'
>>> make[2]: *** [t9129-git-svn-i18n-commitencoding.sh] Error 1
>>>
>>> I see in git-svn.perl that only SVN::Core 1.1.0 is required. Is it still
>>> the intention that git-svn should work with subversion 1.1.x?
>>>
>>> If you're going to bump the minimum requirement I would ask that you
>>> atleast keep 1.3.x as supported. This is the last release of subversion
>>> where RHEL3 can satisfy the dependencies out of the box and I've
>>> verified that the testsuite will pass with 1.3.2.
>>
>> It's still my intention that SVN 1.1.x is supported; but I haven't had
>> the chance to test those versions in a while.
>>
>> Can you rerun the tests that failed with "sh -x t91..." ?
>>
> I've run the tests from 1.6.1 with -v, sh -x and sh -x + -v and dumped  
> the results at http://jupiterrise.com/tmp
>
> You'll find results from one more test (t9106) which I didn't mention  
> and which is also giving me problems but only with rhel4/x86_64 and svn  
> 1.1.4. It should be noted that this test has never worked for me with  
> this config.

Thanks, I'll try to setup an environment that lets me test older
SVN builds over the weekend.

-- 
Eric Wong

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

* [PATCH] git-svn: fix SVN 1.1.x compatibility
  2009-01-17 10:58     ` Eric Wong
@ 2009-01-19  0:45       ` Eric Wong
  2009-01-19  9:17         ` Tom G. Christensen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Wong @ 2009-01-19  0:45 UTC (permalink / raw)
  To: Tom G. Christensen; +Cc: git

The get_log() function in the Perl SVN API introduced the limit
parameter in 1.2.0.  However, this got discarded in our SVN::Ra
compatibility layer when used with SVN 1.1.x.  We now emulate
the limit functionality in older SVN versions by preventing the
original callback from being called if the given limit has been
reached.  This emulation is less bandwidth efficient, but SVN
1.1.x is becoming rarer now.

Additionally, the --limit parameter in svn(1) uses the
aforementioned get_log() functionality change in SVN 1.2.x.
t9129 no longer depends on --limit to work and instead uses
Perl to parse out the commit message.

Thanks to Tom G. Christensen for the bug report.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---

 Hi Tom, this should fix things for you.  I've tested this in an old
 Debian Sarge chroot running SVN 1.1.4

 git-svn.perl                           |   15 ++++++++++++++-
 t/t9129-git-svn-i18n-commitencoding.sh |   13 +++++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index e3e125b..71b8ef4 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4130,10 +4130,23 @@ sub DESTROY {
 	# do not call the real DESTROY since we store ourselves in $RA
 }
 
+# get_log(paths, start, end, limit,
+#         discover_changed_paths, strict_node_history, receiver)
 sub get_log {
 	my ($self, @args) = @_;
 	my $pool = SVN::Pool->new;
-	splice(@args, 3, 1) if ($SVN::Core::VERSION le '1.2.0');
+
+	# the limit parameter was not supported in SVN 1.1.x, so we
+	# drop it.  Therefore, the receiver callback passed to it
+	# is made aware of this limitation by being wrapped if
+	# the limit passed to is being wrapped.
+	if ($SVN::Core::VERSION le '1.2.0') {
+		my $limit = splice(@args, 3, 1);
+		if ($limit > 0) {
+			my $receiver = pop @args;
+			push(@args, sub { &$receiver(@_) if (--$limit >= 0) });
+		}
+	}
 	my $ret = $self->SUPER::get_log(@args, $pool);
 	$pool->clear;
 	$ret;
diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh
index 8a9dde4..9c7b1ad 100755
--- a/t/t9129-git-svn-i18n-commitencoding.sh
+++ b/t/t9129-git-svn-i18n-commitencoding.sh
@@ -15,8 +15,17 @@ compare_git_head_with () {
 }
 
 compare_svn_head_with () {
-	LC_ALL=en_US.UTF-8 svn log --limit 1 `git svn info --url` | \
-		sed -e 1,3d -e "/^-\{1,\}\$/d" >current &&
+	# extract just the log message and strip out committer info.
+	# don't use --limit here since svn 1.1.x doesn't have it,
+	LC_ALL=en_US.UTF-8 svn log `git svn info --url` | perl -w -e '
+		use bytes;
+		$/ = ("-"x72) . "\n";
+		my @x = <STDIN>;
+		@x = split(/\n/, $x[1]);
+		splice(@x, 0, 2);
+		$x[-1] = "";
+		print join("\n", @x);
+	' > current &&
 	test_cmp current "$1"
 }
 
-- 
Eric Wong

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

* Re: [PATCH] git-svn: fix SVN 1.1.x compatibility
  2009-01-19  0:45       ` [PATCH] git-svn: fix SVN 1.1.x compatibility Eric Wong
@ 2009-01-19  9:17         ` Tom G. Christensen
  2009-01-20  1:23           ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Tom G. Christensen @ 2009-01-19  9:17 UTC (permalink / raw)
  To: Eric Wong; +Cc: git@vger.kernel.org

Eric Wong wrote:
> The get_log() function in the Perl SVN API introduced the limit
> parameter in 1.2.0.  However, this got discarded in our SVN::Ra
> compatibility layer when used with SVN 1.1.x.  We now emulate
> the limit functionality in older SVN versions by preventing the
> original callback from being called if the given limit has been
> reached.  This emulation is less bandwidth efficient, but SVN
> 1.1.x is becoming rarer now.
> 
> Additionally, the --limit parameter in svn(1) uses the
> aforementioned get_log() functionality change in SVN 1.2.x.
> t9129 no longer depends on --limit to work and instead uses
> Perl to parse out the commit message.
> 
> Thanks to Tom G. Christensen for the bug report.
> 
> Signed-off-by: Eric Wong <normalperson@yhbt.net>

I applied this to 1.6.1 and the testsuite now passes using SVN 1.1.4 on 
RHEL 4/i386 (t9106 still fails on RHEL 4/x86_64).

-tgc

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

* Re: [PATCH] git-svn: fix SVN 1.1.x compatibility
  2009-01-19  9:17         ` Tom G. Christensen
@ 2009-01-20  1:23           ` Eric Wong
  2009-01-20  8:11             ` Tom G. Christensen
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Wong @ 2009-01-20  1:23 UTC (permalink / raw)
  To: Tom G. Christensen; +Cc: git@vger.kernel.org

"Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
> Eric Wong wrote:
>> The get_log() function in the Perl SVN API introduced the limit
>> parameter in 1.2.0.  However, this got discarded in our SVN::Ra
>> compatibility layer when used with SVN 1.1.x.  We now emulate
>> the limit functionality in older SVN versions by preventing the
>> original callback from being called if the given limit has been
>> reached.  This emulation is less bandwidth efficient, but SVN
>> 1.1.x is becoming rarer now.
>>
>> Additionally, the --limit parameter in svn(1) uses the
>> aforementioned get_log() functionality change in SVN 1.2.x.
>> t9129 no longer depends on --limit to work and instead uses
>> Perl to parse out the commit message.
>>
>> Thanks to Tom G. Christensen for the bug report.
>>
>> Signed-off-by: Eric Wong <normalperson@yhbt.net>
>
> I applied this to 1.6.1 and the testsuite now passes using SVN 1.1.4 on  
> RHEL 4/i386 (t9106 still fails on RHEL 4/x86_64).

Any chance I could have access to that RHEL4/x86_64 environment?  I'll
try to work around bugs in older SVN as best I can, but can't guarantee
anything.

-- 
Eric Wong

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

* Re: [PATCH] git-svn: fix SVN 1.1.x compatibility
  2009-01-20  1:23           ` Eric Wong
@ 2009-01-20  8:11             ` Tom G. Christensen
  0 siblings, 0 replies; 8+ messages in thread
From: Tom G. Christensen @ 2009-01-20  8:11 UTC (permalink / raw)
  To: Eric Wong; +Cc: git@vger.kernel.org

Eric Wong wrote:
> "Tom G. Christensen" <tgc@statsbiblioteket.dk> wrote:
>> Eric Wong wrote:
>>> The get_log() function in the Perl SVN API introduced the limit
>>> parameter in 1.2.0.  However, this got discarded in our SVN::Ra
>>> compatibility layer when used with SVN 1.1.x.  We now emulate
>>> the limit functionality in older SVN versions by preventing the
>>> original callback from being called if the given limit has been
>>> reached.  This emulation is less bandwidth efficient, but SVN
>>> 1.1.x is becoming rarer now.
>>>
>>> Additionally, the --limit parameter in svn(1) uses the
>>> aforementioned get_log() functionality change in SVN 1.2.x.
>>> t9129 no longer depends on --limit to work and instead uses
>>> Perl to parse out the commit message.
>>>
>>> Thanks to Tom G. Christensen for the bug report.
>>>
>>> Signed-off-by: Eric Wong <normalperson@yhbt.net>
>> I applied this to 1.6.1 and the testsuite now passes using SVN 1.1.4 on  
>> RHEL 4/i386 (t9106 still fails on RHEL 4/x86_64).
> 
> Any chance I could have access to that RHEL4/x86_64 environment? 

Unfortunately I can't offer that.
It is really just a mock buildroot, and it should be possible to 
recreate the problem with CentOS 4/x86_64.
On Fedora Linux the default mock install has a suitable config (epel-4).
If you're not a Fedora/CentOS person then I could possibly prepare a 
VMware image for you.

> I'll
> try to work around bugs in older SVN as best I can, but can't guarantee
> anything.
> 
I don't expect more than that.

-tgc

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

end of thread, other threads:[~2009-01-20  8:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09 10:11 Minimum required version of subversion for git-svn? Tom G. Christensen
2009-01-12  1:03 ` Eric Wong
2009-01-12  8:03   ` Tom G. Christensen
2009-01-17 10:58     ` Eric Wong
2009-01-19  0:45       ` [PATCH] git-svn: fix SVN 1.1.x compatibility Eric Wong
2009-01-19  9:17         ` Tom G. Christensen
2009-01-20  1:23           ` Eric Wong
2009-01-20  8:11             ` Tom G. Christensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).