All pastes #1341321 Raw Edit

kumbayo

public diff v1 · immutable
#1341321 ·published 2009-02-18 19:47 UTC
rendered paste body
commit b3ff87a8be00ccd7ba0d288c69037020fd4fdd66Author: Peter Oberndorfer <snip>Date:   Wed Feb 18 20:37:47 2009 +0100    git-svn: try to read the dcommit url from the config file        The commit url is determined in the following order    --commit-url commandline    svn-remote.<name>.dcommiturl    svn-remote.<name>.url        Signed-off-by: Peter Oberndorfer <snip>diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txtindex 3d45654..0d11428 100644--- a/Documentation/git-svn.txt+++ b/Documentation/git-svn.txt@@ -169,6 +169,8 @@ and have no uncommitted changes. 	reused if a user is later given access to an alternate transport 	method (e.g. `svn+ssh://` or `https://`) for commit. +config key: svn-remote.<name>.dcommiturl+ 	Using this option for any other purpose (don't ask) 	is very strongly discouraged. --diff --git a/git-svn.perl b/git-svn.perlindex 83cb36f..ae54d9e 100755--- a/git-svn.perl+++ b/git-svn.perl@@ -438,7 +438,19 @@ sub cmd_dcommit { 		die "Unable to determine upstream SVN information from ", 		    "$head history.\nPerhaps the repository is empty."; 	}-	$url = defined $_commit_url ? $_commit_url : $gs->full_url;++	if (defined $_commit_url) {+		$url = $_commit_url;+	} else {+		my $config_url = eval { command_oneline('config', '--get',+					"svn-remote.$gs->{repo_id}.dcommiturl") };+		if ($config_url) {+			$url = $config_url;+		} else {+			$url = $gs->full_url;+		}+	}+ 	my $last_rev = $_revision if defined $_revision; 	if ($url) { 		print "Committing to $url ...\n";