git-svn: libsvn-perl_1.4.4 and do_switch()
Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1. With this version git-svn uses do_switch instead of do_update, which seems to not work properly, please see
on how to reproduce the problem. The following also is showing a problem, as it blocks in read() after do_switch
git svn clone -T trunk -b branches -t tags \
svn://bruce-guenter.dyndns.org/bglibs
I'm not sure whether this is a git-svn or a subversion problem, thanks for your input.
Regards, Gerrit.
Quoted 7 lines · Gerrit Pape
Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1. With this version git-svn uses
do_switchinstead ofdo_update, which seems to not work properly, please seeon how to reproduce the problem.
Hi, more people ran into this problem, and reported through
http://bugs.debian.org/430091
Can anyone confirm that this is a bug in subversion 1.4.4, or is it a bug in git-svn?
Thanks, Gerrit.
PATCH 1/1 git-svn: fix blocking with svn:// servers after do_switch
In reply to Gerrit PapeWe now explicitly disconnect before starting new SVN::Ra connections. SVN::Ra objects will automatically be disconnected from the server on DESTROY.
SVN servers seem to have problems accepting multiple connections from one client, and the SVN library has trouble being connected to multiple servers at once. This appears to cause opening the second connection to block, and cause git-svn to be unusable after using the do_switch() function.
git-svn opens another connection because a workaround is necesary for the buggy reparent function handling on certain versions of svn:// and svn+ssh:// servers. Instead of using the reparent function (analogous to chdir), it will reopen a new connection to a different URL on the SVN server.
---
Quoted 6 lines · Gerrit Pape
Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1. With this version git-svn uses
do_switchinstead ofdo_update, which seems to not work properly, please see
Quoted 8 lines
on how to reproduce the problem. The following also is showing a problem, as it blocks in
read()afterdo_switchgit svn clone -T trunk -b branches -t tags \
svn://bruce-guenter.dyndns.org/bglibsI'm not sure whether this is a git-svn or a subversion problem, thanks for your input.
Thanks for the bug report. Sorry for the latency these days, I've been quite busy with other things.
Although this fixes blocking reads, this does *not* fix the "Malformed network data" issue, which has been around for a while...
I'll try to find time to fix the "Malformed network data" bug in a few days time, but it's not fatal (just restart git-svn, this error happens at a point where it's not possible to have a corrupted import).
git-svn.perl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
git-svn.perl +1 -0
@@ -3002,6 +3002,7 @@ sub new { \&Git::SVN::Prompt::username, 2), ]); my $config = SVN::Core::config_get_config($config_dir); + $RA = undef; my $self = SVN::Ra->new(url => $url, auth => $baton, config => $config, pool => SVN::Pool->new,
Signature · 1 line
Eric Wong
git-svn: "Malformed network data" issue
Quoted 8 lines · Eric Wong
Although this fixes blocking reads, this does *not* fix the "Malformed network data" issue, which has been around for a while...
I'll try to find time to fix the "Malformed network data" bug in a few days time, but it's not fatal (just restart git-svn, this error happens at a point where it's not possible to have a corrupted import).
Hi, this still is a problem we face on Debian with 1.5.3-rc3
http://bugs.debian.org/436142
http://bugs.debian.org/430091
I'm sorry, I didn't manage to provide a patch.
Thanks, Gerrit.
PATCH 1/1 git-svn: fix "Malformed network data" with svn:// servers
We have a workaround for the reparent function not working correctly on the SVN native protocol servers. This workaround opens a new connection (SVN::Ra object) to the new URL/directory.
Since libsvn appears limited to only supporting one connection at a time, this workaround invalidates the Git::SVN::Ra object that is $self inside gs_fetch_loop_common(). So we need to restart that connection once all the fetching is done for each loop iteration to be able to run get_log() successfully.
---
Quoted 10 lines · Gerrit Pape
Quoted 8 lines · Eric Wong
Although this fixes blocking reads, this does *not* fix the "Malformed network data" issue, which has been around for a while...
I'll try to find time to fix the "Malformed network data" bug in a few days time, but it's not fatal (just restart git-svn, this error happens at a point where it's not possible to have a corrupted import).
Quoted 5 lines
Hi, this still is a problem we face on Debian with 1.5.3-rc3
http://bugs.debian.org/436142
http://bugs.debian.org/430091I'm sorry, I didn't manage to provide a patch.
Sorry for the latency again.
git-svn.perl | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
git-svn.perl +6 -0
@@ -3175,6 +3175,7 @@ sub gs_do_switch { $reparented = 1; } else { $ra = Git::SVN::Ra->new($full_url); + $self->{-invalid} = 1; } } $ra ||= $self;
@@ -3310,6 +3311,11 @@ sub gs_fetch_loop_common { $min = $max + 1; $max += $inc; $max = $head if ($max > $head); + if ($self->{-invalid}) { + my $ra_url = $self->{url}; + $self = undef; + $self = Git::SVN::Ra->new($ra_url); + } } }
Signature · 1 line
Eric Wong
Re: [PATCH] git-svn: fix "Malformed network data" with svn:// servers
Quoted 5 lines · Eric Wong
We have a workaround for the reparent function not working correctly on the SVN native protocol servers. This workaround opens a new connection (
SVN::Raobject) to the new URL/directory.
Quoted 7 lines
Since libsvn appears limited to only supporting one connection at a time, this workaround invalidates the
Git::SVN::Raobject that is $self insidegs_fetch_loop_common(). So we need to restart that connection once all the fetching is done for each loop iteration to be able to runget_log()successfully.Signed-off-by Eric Wong <[email protected]>
Actually, drop this for now. Seems to cause the SVN to block when doing do_switch() again...
Signature · 1 line
Eric Wong
PATCH 1/1 git-svn: fix "Malformed network data" with svn:// servers
We have a workaround for the reparent function not working correctly on the SVN native protocol servers. This workaround opens a new connection (SVN::Ra object) to the new URL/directory.
Since libsvn appears limited to only supporting one connection at a time, this workaround invalidates the Git::SVN::Ra object that is $self inside gs_fetch_loop_common(). So we need to restart that connection once all the fetching is done for each loop iteration to be able to run get_log() successfully.
--- git-svn.perl | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
git-svn.perl +13 -1
@@ -3013,7 +3013,7 @@ package Git::SVN::Ra; use vars qw/@ISA $config_dir $_log_window_size/; use strict; use warnings; -my ($can_do_switch, %ignored_err, $RA); +my ($ra_invalid, $can_do_switch, %ignored_err, $RA); BEGIN { # enforce temporary pool usage for some simple functions
@@ -3174,7 +3174,11 @@ sub gs_do_switch { $self->{url} = $full_url; $reparented = 1; } else { + $_[0] = undef; + $self = undef; + $RA = undef; $ra = Git::SVN::Ra->new($full_url); + $ra_invalid = 1; } } $ra ||= $self;
@@ -3234,6 +3238,7 @@ sub gs_fetch_loop_common { my $inc = $_log_window_size; my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc); my $longest_path = longest_common_path($gsv, $globs); + my $ra_url = $self->{url}; while (1) { my %revs; my $err;
@@ -3295,6 +3300,13 @@ sub gs_fetch_loop_common { "$g->{t}-maxRev"; Git::SVN::tmp_config($k, $r); } + if ($ra_invalid) { + $_[0] = undef; + $self = undef; + $RA = undef; + $self = Git::SVN::Ra->new($ra_url); + $ra_invalid = undef; + } } # pre-fill the .rev_db since it'll eventually get filled in # with '0' x40 if something new gets committed
Signature · 1 line
Eric Wong
Re: [PATCH (try 2)] git-svn: fix "Malformed network data" with svn:// servers
Quoted 4 lines · Eric Wong
We have a workaround for the reparent function not working correctly on the SVN native protocol servers. This workaround opens a new connection (
SVN::Raobject) to the new URL/directory.
Hi, this problem popped up again, please see
http://bugs.debian.org/464713
I can reproduce it with v1.5.4 through
$ git svn clone svn://svn.debian.org/chinese/packages/lunar-applet [...] r159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159) Found branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6 Following parent with do_switch Malformed network data: Malformed network data at /usr/bin/git-svn line 2251
$
Regards, Gerrit.
Re: [PATCH (try 2)] git-svn: fix "Malformed network data" with svn:// servers
Quoted 11 lines · Gerrit Pape
Quoted 4 lines · Eric Wong
We have a workaround for the reparent function not working correctly on the SVN native protocol servers. This workaround opens a new connection (
SVN::Raobject) to the new URL/directory.Hi, this problem popped up again, please see
http://bugs.debian.org/464713I can reproduce it with v1.5.4 through
Quoted 7 lines
$ git svn clone svn://svn.debian.org/chinese/packages/lunar-applet [...] r159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159) Found branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6 Following parent with do_switch Malformed network data: Malformed network data at /usr/bin/git-svn line 2251
Hi, the problem seems to persist, this is 1.5.5:
$ rm -rf lunar-applet && rm -rf lunar-applet &&
git version &&
git svn clone svn://svn.debian.org/chinese/packages/lunar-applet 2>&1 |
tail -n 14
git version 1.5.5
r155 = e99aaa44f7c306d631501b949a0b35be162c1447 (git-svn@159)
M debian/copyright
r156 = d94a736d4b89e3f54ca36b0fc827929050a48a5c (git-svn@159)
M debian/doc-base
r157 = bf2661df6d35a88ff40a6aea9829fbbc94a5c06b (git-svn@159)
M debian/changelog
r158 = 1107cff6309c979751e0841d40b9e2e471694b26 (git-svn@159)
M debian/changelog
M debian/rules
r159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159)
Found branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6
Following parent with do_switch
Malformed network data: Malformed network data at /usr/bin/git-svn line 2270I can't to suggest a fix, sorry.
Thanks, Gerrit.