* [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol. @ 2009-12-22 9:53 Florian Köberle 2009-12-23 7:25 ` Eric Wong 0 siblings, 1 reply; 4+ messages in thread From: Florian Köberle @ 2009-12-22 9:53 UTC (permalink / raw) To: git Hello I haven't seen a link to a bug tracker so I am sending this bug report to the mailing list, I hope it's okay. If you try to run $ git svn branch foo in a project using a svn+ssh url, you get the following error log: Copying svn+ssh://example.org/svn/project/trunk at r1000 to svn+ssh://me@example.org/svn/project/branches/foo... Trying to use an unsupported feature: Source and dest appear not to be in the same repository (src: 'svn+ssh://example.org/svn/project/trunk'; dst: 'svn+ssh://me@example.org/svn/project/branches/foo') at /home/florian/libexec/git-core/git-svn line 722 It fails as the username is missing in the source url. If you modify the git-svn script and add the username it works. The bug can be reproduced with git-svn version 1.6.5.7 (svn 1.5.1). Best regards, Florian ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol. 2009-12-22 9:53 [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol Florian Köberle @ 2009-12-23 7:25 ` Eric Wong 2009-12-23 19:26 ` Florian Köberle 0 siblings, 1 reply; 4+ messages in thread From: Eric Wong @ 2009-12-23 7:25 UTC (permalink / raw) To: Florian Köberle; +Cc: git Florian Köberle <florian@fkoeberle•de> wrote: > Hello > > I haven't seen a link to a bug tracker so I am sending this bug report > to the mailing list, I hope it's okay. Hi Florian, The mailing list is the bug tracker here :) > If you try to run > $ git svn branch foo > in a project using a svn+ssh url, you get the following error log: > > Copying svn+ssh://example.org/svn/project/trunk at r1000 to > svn+ssh://me@example.org/svn/project/branches/foo... > Trying to use an unsupported feature: Source and dest appear not to be > in the same repository (src: 'svn+ssh://example.org/svn/project/trunk'; > dst: 'svn+ssh://me@example.org/svn/project/branches/foo') at > /home/florian/libexec/git-core/git-svn line 722 > > It fails as the username is missing in the source url. If you modify the > git-svn script and add the username it works. The bug can be reproduced > with git-svn version 1.6.5.7 (svn 1.5.1). Thanks for the info, the following patch should help. I rarely get around to testing against svn+ssh servers myself (and they don't appear too common compared to http/https). Let us know how it goes, thanks! From b2bc7e330209659c20d02ee0ba3785f9f59fd0b2 Mon Sep 17 00:00:00 2001 From: Eric Wong <normalperson@yhbt•net> Date: Tue, 22 Dec 2009 22:40:18 -0800 Subject: [PATCH] git svn: branch/tag commands detect username in URLs Signed-off-by: Eric Wong <normalperson@yhbt•net> --- git-svn.perl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index dba0d12..650c9e5 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -663,7 +663,8 @@ sub cmd_branch { } $head ||= 'HEAD'; - my ($src, $rev, undef, $gs) = working_head_info($head); + my (undef, $rev, undef, $gs) = working_head_info($head); + my $src = $gs->full_url; my $remote = Git::SVN::read_all_remotes()->{$gs->{repo_id}}; my $allglobs = $remote->{ $_tag ? 'tags' : 'branches' }; -- Eric Wong ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol. 2009-12-23 7:25 ` Eric Wong @ 2009-12-23 19:26 ` Florian Köberle 2009-12-23 20:03 ` Eric Wong 0 siblings, 1 reply; 4+ messages in thread From: Florian Köberle @ 2009-12-23 19:26 UTC (permalink / raw) To: Eric Wong; +Cc: git Hello Eric, your patch works great. I created successfully a branch on a svn+ssh:// repository using the patched git-svn. Thank you for the patch and the fast reply. I hope the patch find it's way into the next release. Best regards, Florian Eric Wong wrote: > Florian Köberle <florian@fkoeberle•de> wrote: > >> Hello >> >> I haven't seen a link to a bug tracker so I am sending this bug report >> to the mailing list, I hope it's okay. >> > > Hi Florian, > > The mailing list is the bug tracker here :) > > >> If you try to run >> $ git svn branch foo >> in a project using a svn+ssh url, you get the following error log: >> >> Copying svn+ssh://example.org/svn/project/trunk at r1000 to >> svn+ssh://me@example.org/svn/project/branches/foo... >> Trying to use an unsupported feature: Source and dest appear not to be >> in the same repository (src: 'svn+ssh://example.org/svn/project/trunk'; >> dst: 'svn+ssh://me@example.org/svn/project/branches/foo') at >> /home/florian/libexec/git-core/git-svn line 722 >> >> It fails as the username is missing in the source url. If you modify the >> git-svn script and add the username it works. The bug can be reproduced >> with git-svn version 1.6.5.7 (svn 1.5.1). >> > > Thanks for the info, the following patch should help. > > I rarely get around to testing against svn+ssh servers myself > (and they don't appear too common compared to http/https). > > Let us know how it goes, thanks! > > From b2bc7e330209659c20d02ee0ba3785f9f59fd0b2 Mon Sep 17 00:00:00 2001 > From: Eric Wong <normalperson@yhbt•net> > Date: Tue, 22 Dec 2009 22:40:18 -0800 > Subject: [PATCH] git svn: branch/tag commands detect username in URLs > > Signed-off-by: Eric Wong <normalperson@yhbt•net> > --- > git-svn.perl | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/git-svn.perl b/git-svn.perl > index dba0d12..650c9e5 100755 > --- a/git-svn.perl > +++ b/git-svn.perl > @@ -663,7 +663,8 @@ sub cmd_branch { > } > $head ||= 'HEAD'; > > - my ($src, $rev, undef, $gs) = working_head_info($head); > + my (undef, $rev, undef, $gs) = working_head_info($head); > + my $src = $gs->full_url; > > my $remote = Git::SVN::read_all_remotes()->{$gs->{repo_id}}; > my $allglobs = $remote->{ $_tag ? 'tags' : 'branches' }; > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol. 2009-12-23 19:26 ` Florian Köberle @ 2009-12-23 20:03 ` Eric Wong 0 siblings, 0 replies; 4+ messages in thread From: Eric Wong @ 2009-12-23 20:03 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, Florian Köberle, Robert Zeh Florian Köberle <florian@fkoeberle•de> wrote: > Hello Eric, > > your patch works great. I created successfully a branch on a svn+ssh:// > repository using the patched git-svn. > > Thank you for the patch and the fast reply. I hope the patch find it's > way into the next release. Hi Florian, thanks for the report and testing the fix. I've just pushed the that commit and Robert's test for Junio to pull at git://git.bogomips.org/git-svn Eric Wong (1): git svn: branch/tag commands detect username in URLs Robert Zeh (1): git svn: add test for a git svn gc followed by a git svn mkdirs -- Eric Wong ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-23 20:03 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-22 9:53 [BUG REPORT] git-svn fails to create branches if ssh+svn gets used as protocol Florian Köberle 2009-12-23 7:25 ` Eric Wong 2009-12-23 19:26 ` Florian Köberle 2009-12-23 20:03 ` Eric Wong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox