All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, 430091@bugs.debian.org
Subject: [PATCH] git-svn: fix "Malformed network data" with svn:// servers
Date: Fri, 7 Sep 2007 00:34:24 -0700	[thread overview]
Message-ID: <20070907073424.GA16468@mayonaise> (raw)
In-Reply-To: <20070807134220.23420.qmail@c96e4a6cce1e57.315fe32.mid.smarden.org>

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.

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

  Gerrit Pape <pape@smarden.org> wrote:
  > On Wed, Jul 04, 2007 at 02:07:42PM -0700, Eric Wong wrote:
  > >   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.

  Sorry for the latency again.

 git-svn.perl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index d3c8cd0..7df4098 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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);
+		}
 	}
 }
 
-- 
Eric Wong

  reply	other threads:[~2007-09-07  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26 13:37 git-svn: libsvn-perl_1.4.4 and do_switch() Gerrit Pape
2007-07-04  8:04 ` Gerrit Pape
2007-07-04 21:07 ` [PATCH] git-svn: fix blocking with svn:// servers after do_switch Eric Wong
2007-08-07 13:42   ` git-svn: "Malformed network data" issue Gerrit Pape
2007-09-07  7:34     ` Eric Wong [this message]
2007-09-07 10:07       ` [PATCH] git-svn: fix "Malformed network data" with svn:// servers Eric Wong
2007-09-07 11:00         ` [PATCH (try 2)] " Eric Wong
2008-02-08 16:24           ` Gerrit Pape
2008-04-18 13:25             ` Gerrit Pape

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070907073424.GA16468@mayonaise \
    --to=normalperson@yhbt.net \
    --cc=430091@bugs.debian.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.