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>
This commit is contained in:

committed by
Eric Wong

parent
83c2fcff21
commit
0df84059d4
12
git-svn.perl
12
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";
|
||||
|
Reference in New Issue
Block a user