{"thread":{"id":"8729","subject":"git-svn: libsvn-perl_1.4.4 and do_switch()","startedAt":"2007-06-26T13:37:04Z","lastAt":"2008-04-18T13:25:54Z","messageCount":9,"participants":["Gerrit Pape","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45834","messageId":"20070626133704.24521.qmail@a4f750d1ddce1f.315fe32.mid.smarden.org","threadId":"8729","inReplyTo":null,"subject":"git-svn: libsvn-perl_1.4.4 and do_switch()","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-06-26T13:37:04Z","receivedAt":"2007-06-26T13:37:04Z","isPatch":false,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1.\nWith this version git-svn uses do_switch instead of do_update, which\nseems to not work properly, please see\n\n http://bugs.debian.org/430091\n\non how to reproduce the problem.  The following also is showing a\nproblem, as it blocks in read() after do_switch\n\n git svn clone -T trunk -b branches -t tags \\\n   svn://bruce-guenter.dyndns.org/bglibs\n\nI'm not sure whether this is a git-svn or a subversion problem, thanks\nfor your input.\n\nRegards, Gerrit.\n"},{"id":"46450","messageId":"20070704080434.1706.qmail@594e8b6be24871.315fe32.mid.smarden.org","threadId":"8729","inReplyTo":"20070626133704.24521.qmail@a4f750d1ddce1f.315fe32.mid.smarden.org","subject":"Re: git-svn: libsvn-perl_1.4.4 and do_switch()","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-07-04T08:04:34Z","receivedAt":"2007-07-04T08:04:34Z","isPatch":false,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Tue, Jun 26, 2007 at 01:37:04PM +0000, Gerrit Pape wrote:\n> Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1.\n> With this version git-svn uses do_switch instead of do_update, which\n> seems to not work properly, please see\n> \n>  http://bugs.debian.org/430091\n> \n> on how to reproduce the problem.\n\nHi, more people ran into this problem, and reported through\n http://bugs.debian.org/430091\n  \nCan anyone confirm that this is a bug in subversion 1.4.4, or is it a\nbug in git-svn?\n\nThanks, Gerrit.\n"},{"id":"46514","messageId":"20070704210526.GA9582@muzzle","threadId":"8729","inReplyTo":"20070626133704.24521.qmail@a4f750d1ddce1f.315fe32.mid.smarden.org","subject":"[PATCH] git-svn: fix blocking with svn:// servers after do_switch","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-07-04T21:07:42Z","receivedAt":"2007-07-04T21:07:42Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We now explicitly disconnect before starting new SVN::Ra\nconnections.  SVN::Ra objects will automatically be disconnected\nfrom the server on DESTROY.\n\nSVN servers seem to have problems accepting multiple connections\nfrom one client, and the SVN library has trouble being connected\nto multiple servers at once.  This appears to cause opening the\nsecond connection to block, and cause git-svn to be unusable\nafter using the do_switch() function.\n\ngit-svn opens another connection because a workaround is\nnecesary for the buggy reparent function handling on certain\nversions of svn:// and svn+ssh:// servers.  Instead of using the\nreparent function (analogous to chdir), it will reopen a new\nconnection to a different URL on the SVN server.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\n  Gerrit Pape <pape@smarden.org> wrote:\n  > Hi, on Debian unstable the current version of libsvn-perl is 1.4.4dfsg1.\n  > With this version git-svn uses do_switch instead of do_update, which\n  > seems to not work properly, please see\n  > \n  >  http://bugs.debian.org/430091\n  > \n  > on how to reproduce the problem.  The following also is showing a\n  > problem, as it blocks in read() after do_switch\n  > \n  >  git svn clone -T trunk -b branches -t tags \\\n  >    svn://bruce-guenter.dyndns.org/bglibs\n  > \n  > I'm not sure whether this is a git-svn or a subversion problem, thanks\n  > for your input.\n\n  Thanks for the bug report.  Sorry for the latency these days, I've\n  been quite busy with other things.\n\n  Although this fixes blocking reads, this does *not* fix the\n  \"Malformed network data\" issue, which has been around for a\n  while...\n\n  I'll try to find time to fix the \"Malformed network data\" bug\n  in a few days time, but it's not fatal (just restart git-svn,\n  this error happens at a point where it's not possible to have\n  a corrupted import).\n\n git-svn.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 51979f9..b3dffcc 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3002,6 +3002,7 @@ sub new {\n \t      \\&Git::SVN::Prompt::username, 2),\n \t  ]);\n \tmy $config = SVN::Core::config_get_config($config_dir);\n+\t$RA = undef;\n \tmy $self = SVN::Ra->new(url => $url, auth => $baton,\n \t                      config => $config,\n \t\t\t      pool => SVN::Pool->new,\n-- \nEric Wong\n"},{"id":"50127","messageId":"20070807134220.23420.qmail@c96e4a6cce1e57.315fe32.mid.smarden.org","threadId":"8729","inReplyTo":"20070704210526.GA9582@muzzle","subject":"git-svn: \"Malformed network data\" issue","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-08-07T13:42:20Z","receivedAt":"2007-08-07T13:42:20Z","isPatch":false,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Wed, Jul 04, 2007 at 02:07:42PM -0700, Eric Wong wrote:\n>   Although this fixes blocking reads, this does *not* fix the\n>   \"Malformed network data\" issue, which has been around for a\n>   while...\n> \n>   I'll try to find time to fix the \"Malformed network data\" bug\n>   in a few days time, but it's not fatal (just restart git-svn,\n>   this error happens at a point where it's not possible to have\n>   a corrupted import).\n\nHi, this still is a problem we face on Debian with 1.5.3-rc3\n http://bugs.debian.org/436142\n http://bugs.debian.org/430091\n\nI'm sorry, I didn't manage to provide a patch.\n\nThanks, Gerrit.\n"},{"id":"52868","messageId":"20070907073424.GA16468@mayonaise","threadId":"8729","inReplyTo":"20070807134220.23420.qmail@c96e4a6cce1e57.315fe32.mid.smarden.org","subject":"[PATCH] git-svn: fix \"Malformed network data\" with svn:// servers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-09-07T07:34:24Z","receivedAt":"2007-09-07T07:34:24Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We have a workaround for the reparent function not working\ncorrectly on the SVN native protocol servers.  This workaround\nopens a new connection (SVN::Ra object) to the new\nURL/directory.\n\nSince libsvn appears limited to only supporting one connection\nat a time, this workaround invalidates the Git::SVN::Ra object\nthat is $self inside gs_fetch_loop_common().  So we need to\nrestart that connection once all the fetching is done for each\nloop iteration to be able to run get_log() successfully.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n\n  Gerrit Pape <pape@smarden.org> wrote:\n  > On Wed, Jul 04, 2007 at 02:07:42PM -0700, Eric Wong wrote:\n  > >   Although this fixes blocking reads, this does *not* fix the\n  > >   \"Malformed network data\" issue, which has been around for a\n  > >   while...\n  > > \n  > >   I'll try to find time to fix the \"Malformed network data\" bug\n  > >   in a few days time, but it's not fatal (just restart git-svn,\n  > >   this error happens at a point where it's not possible to have\n  > >   a corrupted import).\n  > \n  > Hi, this still is a problem we face on Debian with 1.5.3-rc3\n  >  http://bugs.debian.org/436142\n  >  http://bugs.debian.org/430091\n  > \n  > I'm sorry, I didn't manage to provide a patch.\n\n  Sorry for the latency again.\n\n git-svn.perl |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex d3c8cd0..7df4098 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3175,6 +3175,7 @@ sub gs_do_switch {\n \t\t\t$reparented = 1;\n \t\t} else {\n \t\t\t$ra = Git::SVN::Ra->new($full_url);\n+\t\t\t$self->{-invalid} = 1;\n \t\t}\n \t}\n \t$ra ||= $self;\n@@ -3310,6 +3311,11 @@ sub gs_fetch_loop_common {\n \t\t$min = $max + 1;\n \t\t$max += $inc;\n \t\t$max = $head if ($max > $head);\n+\t\tif ($self->{-invalid}) {\n+\t\t\tmy $ra_url = $self->{url};\n+\t\t\t$self = undef;\n+\t\t\t$self = Git::SVN::Ra->new($ra_url);\n+\t\t}\n \t}\n }\n \n-- \nEric Wong\n"},{"id":"52884","messageId":"20070907100711.GA24166@muzzle","threadId":"8729","inReplyTo":"20070907073424.GA16468@mayonaise","subject":"Re: [PATCH] git-svn: fix \"Malformed network data\" with svn:// servers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-09-07T10:07:11Z","receivedAt":"2007-09-07T10:07:11Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> We have a workaround for the reparent function not working\n> correctly on the SVN native protocol servers.  This workaround\n> opens a new connection (SVN::Ra object) to the new\n> URL/directory.\n> \n> Since libsvn appears limited to only supporting one connection\n> at a time, this workaround invalidates the Git::SVN::Ra object\n> that is $self inside gs_fetch_loop_common().  So we need to\n> restart that connection once all the fetching is done for each\n> loop iteration to be able to run get_log() successfully.\n> \n> Signed-off-by: Eric Wong <normalperson@yhbt.net>\n\nActually, drop this for now.  Seems to cause the SVN to block\nwhen doing do_switch() again...\n\n-- \nEric Wong\n"},{"id":"52894","messageId":"20070907110040.GA9369@mayonaise","threadId":"8729","inReplyTo":"20070907100711.GA24166@muzzle","subject":"[PATCH (try 2)] git-svn: fix \"Malformed network data\" with svn:// servers","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-09-07T11:00:40Z","receivedAt":"2007-09-07T11:00:40Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We have a workaround for the reparent function not working\ncorrectly on the SVN native protocol servers.  This workaround\nopens a new connection (SVN::Ra object) to the new\nURL/directory.\n\nSince libsvn appears limited to only supporting one connection\nat a time, this workaround invalidates the Git::SVN::Ra object\nthat is $self inside gs_fetch_loop_common().  So we need to\nrestart that connection once all the fetching is done for each\nloop iteration to be able to run get_log() successfully.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |   14 +++++++++++++-\n 1 files changed, 13 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex d3c8cd0..fbd4691 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -3013,7 +3013,7 @@ package Git::SVN::Ra;\n use vars qw/@ISA $config_dir $_log_window_size/;\n use strict;\n use warnings;\n-my ($can_do_switch, %ignored_err, $RA);\n+my ($ra_invalid, $can_do_switch, %ignored_err, $RA);\n \n BEGIN {\n \t# enforce temporary pool usage for some simple functions\n@@ -3174,7 +3174,11 @@ sub gs_do_switch {\n \t\t\t$self->{url} = $full_url;\n \t\t\t$reparented = 1;\n \t\t} else {\n+\t\t\t$_[0] = undef;\n+\t\t\t$self = undef;\n+\t\t\t$RA = undef;\n \t\t\t$ra = Git::SVN::Ra->new($full_url);\n+\t\t\t$ra_invalid = 1;\n \t\t}\n \t}\n \t$ra ||= $self;\n@@ -3234,6 +3238,7 @@ sub gs_fetch_loop_common {\n \tmy $inc = $_log_window_size;\n \tmy ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);\n \tmy $longest_path = longest_common_path($gsv, $globs);\n+\tmy $ra_url = $self->{url};\n \twhile (1) {\n \t\tmy %revs;\n \t\tmy $err;\n@@ -3295,6 +3300,13 @@ sub gs_fetch_loop_common {\n \t\t\t\t        \"$g->{t}-maxRev\";\n \t\t\t\tGit::SVN::tmp_config($k, $r);\n \t\t\t}\n+\t\t\tif ($ra_invalid) {\n+\t\t\t\t$_[0] = undef;\n+\t\t\t\t$self = undef;\n+\t\t\t\t$RA = undef;\n+\t\t\t\t$self = Git::SVN::Ra->new($ra_url);\n+\t\t\t\t$ra_invalid = undef;\n+\t\t\t}\n \t\t}\n \t\t# pre-fill the .rev_db since it'll eventually get filled in\n \t\t# with '0' x40 if something new gets committed\n-- \nEric Wong\n"},{"id":"67962","messageId":"20080208162433.25929.qmail@dd8a37fc58824d.315fe32.mid.smarden.org","threadId":"8729","inReplyTo":"20070907110040.GA9369@mayonaise","subject":"Re: [PATCH (try 2)] git-svn: fix \"Malformed network data\" with svn:// servers","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-02-08T16:24:33Z","receivedAt":"2008-02-08T16:24:33Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Fri, Sep 07, 2007 at 04:00:40AM -0700, Eric Wong wrote:\n> We have a workaround for the reparent function not working\n> correctly on the SVN native protocol servers.  This workaround\n> opens a new connection (SVN::Ra object) to the new\n> URL/directory.\n\nHi, this problem popped up again, please see\n http://bugs.debian.org/464713\n \nI can reproduce it with v1.5.4 through\n\n $ git svn clone svn://svn.debian.org/chinese/packages/lunar-applet\n [...]\n r159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159)\n Found branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6\n Following parent with do_switch\n Malformed network data: Malformed network data at /usr/bin/git-svn line\n 2251\n\n $ \n\nRegards, Gerrit.\n"},{"id":"74728","messageId":"20080418132554.3548.qmail@3605a0899cbb1f.315fe32.mid.smarden.org","threadId":"8729","inReplyTo":"20080208162433.25929.qmail@dd8a37fc58824d.315fe32.mid.smarden.org","subject":"Re: [PATCH (try 2)] git-svn: fix \"Malformed network data\" with svn:// servers","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-04-18T13:25:54Z","receivedAt":"2008-04-18T13:25:54Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Fri, Feb 08, 2008 at 04:24:33PM +0000, Gerrit Pape wrote:\n> On Fri, Sep 07, 2007 at 04:00:40AM -0700, Eric Wong wrote:\n> > We have a workaround for the reparent function not working\n> > correctly on the SVN native protocol servers.  This workaround\n> > opens a new connection (SVN::Ra object) to the new\n> > URL/directory.\n> \n> Hi, this problem popped up again, please see\n>  http://bugs.debian.org/464713\n>  \n> I can reproduce it with v1.5.4 through\n> \n>  $ git svn clone svn://svn.debian.org/chinese/packages/lunar-applet\n>  [...]\n>  r159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159)\n>  Found branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6\n>  Following parent with do_switch\n>  Malformed network data: Malformed network data at /usr/bin/git-svn line\n>  2251\n\nHi, the problem seems to persist, this is 1.5.5:\n\n$ rm -rf lunar-applet && rm -rf lunar-applet &&\n  git version &&\n  git svn clone svn://svn.debian.org/chinese/packages/lunar-applet 2>&1 |\n    tail -n 14\ngit version 1.5.5\nr155 = e99aaa44f7c306d631501b949a0b35be162c1447 (git-svn@159)\n        M       debian/copyright\nr156 = d94a736d4b89e3f54ca36b0fc827929050a48a5c (git-svn@159)\n        M       debian/doc-base\nr157 = bf2661df6d35a88ff40a6aea9829fbbc94a5c06b (git-svn@159)\n        M       debian/changelog\nr158 = 1107cff6309c979751e0841d40b9e2e471694b26 (git-svn@159)\n        M       debian/changelog\n        M       debian/rules\nr159 = 010d0b481753bd32ce0255ce433d63e14114d3b6 (git-svn@159)\nFound branch parent: (git-svn) 010d0b481753bd32ce0255ce433d63e14114d3b6\nFollowing parent with do_switch\nMalformed network data: Malformed network data at /usr/bin/git-svn line 2270\n\n\nI can't to suggest a fix, sorry.\n\nThanks, Gerrit.\n"}]}