Skip to content

Commit

Permalink
git-svn: fix mismatched src/dst errors for branch/tag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Igor Mironov authored and Eric Wong committed Jan 23, 2010
1 parent 41c0169 commit a83b91e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a83b91e

Please sign in to comment.