git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: error out when the SVN connection fails during a fetch

From
EWEric Wong <normalperson@yhbt.net>
Date
Dec 4, 2006, 08:52 UTC
Message-ID
<20061204085253.GA31047@soma>
In-Reply-To
<871wnget3b.fsf@mid.deneb.enyo.de>
Florian Weimer <fw@deneb.enyo.de> wrote:
Show 11 quoted lines
> * Eric Wong:
> 
> > finish_report does seem to return a useful value indicating success
> > or failure, so we'll just set a flag when close_edit is called
> > (it is not called on failures, nor is abort_edit) and check
> > the flag before proceeding.
> 
> It seems that this needs some kind of fine-tuning.  Now that git-svn
> uses HTTP keepalive connections, you get a HTTP request error once you
> run into the server-side request limit.  It seems a bit excessive to
> stop completely in this case.
Does the following patch help?
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 4 Dec 2006 00:51:16 -0800
Subject: [PATCH] git-svn: avoid network timeouts for long-running fetches

Long-running fetches run inside children to avoid memory leaks. When we refork, the connection in the parent can be idle for a long time; attempting to reuse it in the next child can result in timeouts.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index d0bd0bd..747daf0 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -459,6 +459,7 @@ sub fetch_lib {
 		$min = $max + 1;
 		$max += $inc;
 		$max = $head if ($max > $head);
+		$SVN = libsvn_connect($SVN_URL);
 	}
 	restore_index($index);
 	return { revision => $last_rev, commit => $last_commit };
Previous: Florian WeimerNext: Florian Weimer
Message 4 of 9 in “git-svn: error out when the SVN connection fails during a fetch”
  1. git-svn: error out when the SVN connection fails during a fetchEric Wong, Nov 28, 2006
  2. Eric WongNov 28, 2006
  3. Florian WeimerDec 3, 2006
  4. Eric WongDec 4, 2006
  5. Florian WeimerDec 4, 2006
  6. Eric WongDec 4, 2006
  7. Florian WeimerDec 6, 2006
  8. Junio C HamanoDec 6, 2006
  9. Eric WongDec 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.