Similar to the 'remote.<name>.pushurl' config key for git remotes, the 'pushurl' key is treated the same as the 'url' key. This is distinct from the 'commiturl' key, which is defined to be a full svn path. This is necessary if you want to be able to commit to multiple branches. Signed-off-by: Alejandro R. SedeÃo <asedeno@xxxxxxx> Reviewed-off-by: James Y Knight <jknight@xxxxxxxxxxxxxxx> --- Documentation/git-svn.txt | 6 ++++++ git-svn.perl | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index ea8fafd..94f7497 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -648,6 +648,12 @@ svn-remote.<name>.rewriteUUID:: where the original UUID is not available via either useSvmProps or useSvnsyncProps. +svn-remote.<name>.pushurl:: + Similar to git's remote.<name>.pushurl, this is useful in + cases where the SVN repository url is read-only. Unlike + 'commiturl', 'pushurl' is a base path. This key is overridden + by the 'commiturl' config key. + svn.brokenSymlinkWorkaround:: This disables potentially expensive checks to workaround broken symlinks checked into SVN by broken clients. Set this diff --git a/git-svn.perl b/git-svn.perl index fa8cd07..8372606 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -531,7 +531,13 @@ sub cmd_dcommit { $url = eval { command_oneline('config', '--get', "svn-remote.$gs->{repo_id}.commiturl") }; if (!$url) { - $url = $gs->full_url + $url = eval { command_oneline('config', '--get', + "svn-remote.$gs->{repo_id}.pushurl") }; + if ($url) { + $url .= (length $gs->{path} ? '/' . $gs->{path} : ''); + } else { + $url = $gs->full_url + } } } @@ -730,7 +736,11 @@ sub cmd_branch { $url = eval { command_oneline('config', '--get', "svn-remote.$gs->{repo_id}.commiturl") }; if (!$url) { - $url = $remote->{url}; + $url = eval { command_oneline('config', '--get', + "svn-remote.$gs->{repo_id}.pushurl") }; + if (!$url) { + $url = $remote->{url}; + } } } my $dst = join '/', $url, $lft, $branch_name, ($rgt || ()); -- 1.7.4.2.1.gd6f1f -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html