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>
Igor Mironov committed
Jan 12, 2010 at 03:20 UTC
a83b91e7246fed3df5686c29a3c64eed8670fd98
1 file changed
+4
git-svn.perl
+4
@@ -710,6 +710,10 @@ sub cmd_branch {
710
my ($lft, $rgt) = @{ $glob->{path} }{qw/left right/};
711
my $dst = join '/', $remote->{url}, $lft, $branch_name, ($rgt || ());
712
713
+ if ($dst =~ /^https:/ && $src =~ /^http:/) {
714
+ $src=~s/^http:/https:/;
715
+ }
716
+
717
my $ctx = SVN::Client->new(
718
auth => Git::SVN::Ra::_auth_providers(),
719
log_msg => sub {