git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] git-svn: fix the trivial case of 'src and dst not in the same repo' during branch/tag
@ 2010-01-11 16:20 Igor Mironov
  2010-01-12  4:27 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Mironov @ 2010-01-11 16:20 UTC (permalink / raw)
  To: git; +Cc: Eric Wong

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') at /usr/lib/git-core/git-svn line 623
Signed-off-by: Igor Mironov <igor.a.mironov@gmail.com>
---
 git-svn.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 650c9e5..3f7ccc1 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 {
-- 
1.6.6.106.ge2de8

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/4] git-svn: fix the trivial case of 'src and dst not in the same repo' during branch/tag
  2010-01-11 16:20 [PATCH 1/4] git-svn: fix the trivial case of 'src and dst not in the same repo' during branch/tag Igor Mironov
@ 2010-01-12  4:27 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2010-01-12  4:27 UTC (permalink / raw)
  To: Igor Mironov; +Cc: git

Igor Mironov <igor.a.mironov@gmail.com> wrote:
> This fixes the following issue:
> $ git svn branch -t --username=svnuser --commit-url=https://myproj.domain.com/svn mytag

Thanks Igor!

I've shorted the subject lines and line-wrapped the commit messages to
fit in standard terminals, and pushed them out to:
git://git.bogomips.org/git-svn

Igor Mironov (4):
      git-svn: fix mismatched src/dst errors for branch/tag
      git-svn: respect commiturl option for branch/tag
      git-svn: add --username/commit-url options for branch/tag
      git-svn: document --username/commit-url for branch/tag

I'll be working on dcommit error handling in a bit
before asking Junio to pull.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-12  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 16:20 [PATCH 1/4] git-svn: fix the trivial case of 'src and dst not in the same repo' during branch/tag Igor Mironov
2010-01-12  4:27 ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).