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

[PATCH] git-svn: establish new connections on commit after fork

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 25, 2006, 19:28 UTC
Message-ID
<20060825192818.GB8957@localdomain>
In-Reply-To
<20060825191516.GA8957@localdomain>

SVN seems to have a problem with https:// repositories from time-to-time when doing multiple, sequential commits. This problem is not consistently reproducible without the patch, but it should go away entirely with this patch...

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 0d58bb9..b311c3d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -500,6 +500,8 @@ sub commit_lib {
 	my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef, 0) : ();
 	my $commit_msg = "$GIT_SVN_DIR/.svn-commit.tmp.$$";
 
+	my $repo;
+	($repo, $SVN_PATH) = repo_path_split($SVN_URL);
 	set_svn_commit_env();
 	foreach my $c (@revs) {
 		my $log_msg = get_commit_message($c, $commit_msg);
@@ -508,6 +510,8 @@ sub commit_lib {
 		# can't track down... (it's probably in the SVN code)
 		defined(my $pid = open my $fh, '-|') or croak $!;
 		if (!$pid) {
+			$SVN_LOG = libsvn_connect($repo);
+			$SVN = libsvn_connect($repo);
 			my $ed = SVN::Git::Editor->new(
 					{	r => $r_last,
 						ra => $SVN,
-- 
1.4.2.g7c9b
Previous: Eric WongNext: Eric Wong
Message 3 of 8 in “git-svn problem: unexpected files/diffs in commit”
  1. Seth FalconAug 25, 2006
  2. Eric WongAug 25, 2006
  3. git-svn: establish new connections on commit after forkEric Wong, Aug 25, 2006
  4. git-svn: recommend rebase for syncing against an SVN repoEric Wong, Aug 25, 2006
  5. Seth FalconAug 26, 2006
  6. Eric WongAug 26, 2006
  7. git-svn: add the 'dcommit' commandEric Wong, Aug 26, 2006
  8. git-svn: stop repeatedly reusing the first commit message with dcommitEric Wong, Aug 26, 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.