summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Mironov <igor.a.mironov@gmail.com>2010-01-12 03:20:43 +1100
committerEric Wong <normalperson@yhbt.net>2010-01-23 03:23:03 -0800
commita83b91e7246fed3df5686c29a3c64eed8670fd98 (patch)
tree2bce3f985e5b211fbbdbf38cc38cb5f721cbae1b
parent41c01693ac13846c73a31c8f5c3a60206e1643be (diff)
downloadgit-a83b91e7246fed3df5686c29a3c64eed8670fd98.tar.gz
git-svn: fix mismatched src/dst errors for branch/tag
This fixes the following issue: $ git svn branch -t --username=svnuser \ --commit-url=https://myproj.domain.com/svn mytag Copying http://myproj.domain.com/svn/trunk at r26 to https://myproj.domain.com/svn/tags/mytag... Trying to use an unsupported feature: Source and dest appear not to be in the same repository (src: 'http://myproj.domain.com/svn/trunk'; dst: 'https://myproj.domain.com/svn/tags/mytag') [ew: shortened subject] Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-xgit-svn.perl4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index e0773eff4e..e05bf366cc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -710,6 +710,10 @@ sub cmd_branch {
my ($lft, $rgt) = @{ $glob->{path} }{qw/left right/};
my $dst = join '/', $remote->{url}, $lft, $branch_name, ($rgt || ());
+ if ($dst =~ /^https:/ && $src =~ /^http:/) {
+ $src=~s/^http:/https:/;
+ }
+
my $ctx = SVN::Client->new(
auth => Git::SVN::Ra::_auth_providers(),
log_msg => sub {