From: Igor Mironov Date: Mon, 11 Jan 2010 16:20:43 +0000 (+1100) Subject: git-svn: fix mismatched src/dst errors for branch/tag X-Git-Tag: v1.7.0-rc0~11^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a83b91e7246fed3df5686c29a3c64eed8670fd98;p=git.git 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 Acked-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index e0773eff4..e05bf366c 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 {