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

[PATCH] git svn: always reuse existing remotes on fetch

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 22, 2009, 23:39 UTC
Message-ID
<20091122233954.GA23448@dcvr.yhbt.net>
In-Reply-To
<20091120204723.GB30423@dcvr.yhbt.net>
Eric Wong <normalperson@yhbt.net> wrote:
> so there's apparently a bug in our handling of
> svn-remote != "svn" somewhere...
>From 4d0157d6995925ea55ff181ea94d058583333f90 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Sun, 22 Nov 2009 12:37:06 -0800
Subject: [PATCH] git svn: always reuse existing remotes on fetch

The internal no_reuse_existing flag is set to allow initializing multiple remotes with the same URL, common with SVM users.

Unfortunately, this flag caused misbehavior when used with the -R command-line flag for fetching.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 2746895..7f7a56f 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -428,6 +428,7 @@ sub cmd_fetch {
 	if (@_ > 1) {
 		die "Usage: $0 fetch [--all] [--parent] [svn-remote]\n";
 	}
+	$Git::SVN::no_reuse_existing = undef;
 	if ($_fetch_parent) {
 		my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
 		unless ($gs) {
@@ -956,6 +957,7 @@ sub cmd_multi_init {
 }
 
 sub cmd_multi_fetch {
+	$Git::SVN::no_reuse_existing = undef;
 	my $remotes = Git::SVN::read_all_remotes();
 	foreach my $repo_id (sort keys %$remotes) {
 		if ($remotes->{$repo_id}->{url}) {
-- 
Eric Wong
Previous: Eric Wong
Message 9 of 9 in “git-svn of both trunk and tags while having no access to the 'parent' of those”
  1. Yaroslav HalchenkoNov 17, 2009
  2. Michael J GruberNov 18, 2009
  3. Yaroslav HalchenkoNov 18, 2009
  4. Michael J GruberNov 18, 2009
  5. Yaroslav HalchenkoNov 18, 2009
  6. Michael J GruberNov 18, 2009
  7. Eric WongNov 19, 2009
  8. Eric WongNov 20, 2009
  9. git svn: always reuse existing remotes on fetchEric Wong, Nov 22, 2009

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.