summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorPeter Oberndorfer <kumbayo84@arcor.de>2009-02-23 11:02:53 (GMT)
committerEric Wong <normalperson@yhbt.net>2009-02-23 21:50:24 (GMT)
commit0df84059d4127ed06e040998ec0e6ce6f61d3d1f (patch)
treeb75ea268ea5a6522c234e6e8fe727dca28299946 /git-svn.perl
parent83c2fcff214fe89649fcd88e095d9961a36b53dd (diff)
downloadgit-0df84059d4127ed06e040998ec0e6ce6f61d3d1f.zip
git-0df84059d4127ed06e040998ec0e6ce6f61d3d1f.tar.gz
git-0df84059d4127ed06e040998ec0e6ce6f61d3d1f.tar.bz2
git-svn: read the dcommit url from the config file on a per remote basis
The commit url for dcommit is determined in the following order: commandline option --commit-url svn.commiturl svn-remote.<name>.commiturl svn-remote.<name>.url Signed-off-by: Peter Oberndorfer <kumbayo84@arcor.de> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl12
1 files changed, 11 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index bce24a8..d8476c8 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -438,7 +438,17 @@ 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 {
+ $url = eval { command_oneline('config', '--get',
+ "svn-remote.$gs->{repo_id}.commiturl") };
+ if (!$url) {
+ $url = $gs->full_url
+ }
+ }
+
my $last_rev = $_revision if defined $_revision;
if ($url) {
print "Committing to $url ...\n";