{"thread":{"id":"17223","subject":"Re: [PATCH] git svn clone -s was not prefixing 'branches/'","startedAt":"2009-01-17T10:54:27Z","lastAt":"2009-01-18T01:24:39Z","messageCount":4,"participants":["Eric Wong","Jon Lim","Björn Steinbrink"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"100818","messageId":"20090117105427.GA15801@dcvr.yhbt.net","threadId":"17223","inReplyTo":"1232050647-2870-1-git-send-email-snowblink@gmail.com","subject":"Re: [PATCH] git svn clone -s was not prefixing 'branches/'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-01-17T10:54:27Z","receivedAt":"2009-01-17T10:54:27Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jonathan Lim <snowblink@gmail.com> wrote:\n> All branches in the subversion repository would appear at the same\n> level as trunk.  The should now appear with a 'branches/' prefix.\n> \n> Signed-off-by: Jonathan Lim <snowblink@gmail.com>\n\nThis is too ugly for the common existing cases.  For the rare case where\nthis could lead to a namespace conflict[1], it's possible to work around\nit by editing .git/config.\n\nI would accept a --tags-prefix= and --branches-prefix= patch to make\nthis possible w/o having to edit .git/config, but I don't want the\ndefault prefixes changed.\n\nThanks,\n\n[1] - \"/branches/trunk\" vs \"/trunk\", which I've yet to see evidence of...\n\n> ---\n>  git-svn.perl |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index ad01e18..17d65cb 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -789,7 +789,7 @@ sub cmd_multi_init {\n>  \t}\n>  \treturn unless defined $_branches || defined $_tags;\n>  \tmy $ra = $url ? Git::SVN::Ra->new($url) : undef;\n> -\tcomplete_url_ls_init($ra, $_branches, '--branches/-b', $_prefix);\n> +\tcomplete_url_ls_init($ra, $_branches, '--branches/-b', $_prefix . 'branches/');\n>  \tcomplete_url_ls_init($ra, $_tags, '--tags/-t', $_prefix . 'tags/');\n>  }\n"},{"id":"100820","messageId":"751e526a0901170339m6471ac84tdb032a090d19d7c6@mail.gmail.com","threadId":"17223","inReplyTo":"20090117105427.GA15801@dcvr.yhbt.net","subject":"Re: [PATCH] git svn clone -s was not prefixing 'branches/'","fromName":"Jon Lim","fromEmail":"snowblink@gmail.com","sentAt":"2009-01-17T11:39:28Z","receivedAt":"2009-01-17T11:39:28Z","isPatch":true,"sender":{"key":"snowblink@gmail.com","avatar":null},"body":"Hi,\n\nMaybe this patch doesn't fix the problem I was having. I will attempt\nto describe it better here.\n\nI understand that a standard subversion setup is as follows:\ntrunk\nbranches\ntags\n\nWith the -s option, svn clone should expect this.\n\nUsing the example subversion repository:\ntrunk\nbranches/RB_1.0\nbranches/RB_2.0\ntags/REL_1.0\ntags/REL_2.0\n\nCurrently, using the -s option you get:\ntrunk\nRB_1.0\nRB_2.0\ntags/REL_1.0\ntags/REL_2.0\n\nI think it makes sense to have:\ntrunk\nbranches/RB_1.0\nbranches/RB_2.0\ntags/REL_1.0\ntags/REL_2.0\n\nRegards,\nJon\n\nOn Sat, Jan 17, 2009 at 10:54, Eric Wong <normalperson@yhbt.net> wrote:\n> Jonathan Lim <snowblink@gmail.com> wrote:\n>> All branches in the subversion repository would appear at the same\n>> level as trunk.  The should now appear with a 'branches/' prefix.\n>>\n>> Signed-off-by: Jonathan Lim <snowblink@gmail.com>\n>\n> This is too ugly for the common existing cases.  For the rare case where\n> this could lead to a namespace conflict[1], it's possible to work around\n> it by editing .git/config.\n>\n> I would accept a --tags-prefix= and --branches-prefix= patch to make\n> this possible w/o having to edit .git/config, but I don't want the\n> default prefixes changed.\n>\n> Thanks,\n>\n> [1] - \"/branches/trunk\" vs \"/trunk\", which I've yet to see evidence of...\n>\n>> ---\n>>  git-svn.perl |    2 +-\n>>  1 files changed, 1 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/git-svn.perl b/git-svn.perl\n>> index ad01e18..17d65cb 100755\n>> --- a/git-svn.perl\n>> +++ b/git-svn.perl\n>> @@ -789,7 +789,7 @@ sub cmd_multi_init {\n>>       }\n>>       return unless defined $_branches || defined $_tags;\n>>       my $ra = $url ? Git::SVN::Ra->new($url) : undef;\n>> -     complete_url_ls_init($ra, $_branches, '--branches/-b', $_prefix);\n>> +     complete_url_ls_init($ra, $_branches, '--branches/-b', $_prefix . 'branches/');\n>>       complete_url_ls_init($ra, $_tags, '--tags/-t', $_prefix . 'tags/');\n>>  }\n>\n\n\n\n-- \nhttp://snowblink.co.uk/\n"},{"id":"100821","messageId":"20090117120723.GA24549@atjola.homenet","threadId":"17223","inReplyTo":"751e526a0901170339m6471ac84tdb032a090d19d7c6@mail.gmail.com","subject":"Re: [PATCH] git svn clone -s was not prefixing 'branches/'","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2009-01-17T12:07:23Z","receivedAt":"2009-01-17T12:07:23Z","isPatch":true,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2009.01.17 11:39:28 +0000, Jon Lim wrote:\n> Hi,\n> \n> Maybe this patch doesn't fix the problem I was having. I will attempt\n> to describe it better here.\n> \n> I understand that a standard subversion setup is as follows:\n> trunk\n> branches\n> tags\n> \n> With the -s option, svn clone should expect this.\n> \n> Using the example subversion repository:\n> trunk\n> branches/RB_1.0\n> branches/RB_2.0\n> tags/REL_1.0\n> tags/REL_2.0\n> \n> Currently, using the -s option you get:\n> trunk\n> RB_1.0\n> RB_2.0\n> tags/REL_1.0\n> tags/REL_2.0\n> \n> I think it makes sense to have:\n> trunk\n> branches/RB_1.0\n> branches/RB_2.0\n> tags/REL_1.0\n> tags/REL_2.0\n\nWhy? \"trunk\" is just a branch like any other branch, too. It's basically\njust a svn convention that it's not in branches/ but in its own\n\"toplevel\" directory. Once imported into git, it's just an ordinary\nremote tracking branch. It's already pretty well distiguishable from all\nthe other branches due to its name.\n\nWhat _does_ make sense is to have a common prefix for all the stuff you\ngot from svn, using for example --prefix=svn/. That way you get:\nsvn/trunk\nsvn/RB_1.0\nsvn/RB_2.0\nsvn/tags/REL_1.0\nsvn/tags/REL_2.0\n\nThe important part is that those names aren't ambiguous if you have\nlocal branch heads called, for example:\ntrunk\nRB_1.0\nRB_2.0\n\nas the svn/ prefix is part of the shortname for the remote tracking\nbranches. So \"trunk\" is the branch head and \"svn/trunk\" is the remote\ntracking branch.\n\nBtw Eric, is there any reason why there's no prefix used by default?\nUsing the name for the svn-remote as the prefix would make a lot of\nsense to me.\n\nBjörn\n"},{"id":"100903","messageId":"20090118012439.GA31969@dcvr.yhbt.net","threadId":"17223","inReplyTo":"20090117120723.GA24549@atjola.homenet","subject":"Re: [PATCH] git svn clone -s was not prefixing 'branches/'","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-01-18T01:24:39Z","receivedAt":"2009-01-18T01:24:39Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Björn Steinbrink <B.Steinbrink@gmx.de> wrote:\n> On 2009.01.17 11:39:28 +0000, Jon Lim wrote:\n> > Hi,\n> > \n> > Maybe this patch doesn't fix the problem I was having. I will attempt\n> > to describe it better here.\n> > \n> > I understand that a standard subversion setup is as follows:\n> > trunk\n> > branches\n> > tags\n> > \n> > With the -s option, svn clone should expect this.\n> > \n> > Using the example subversion repository:\n> > trunk\n> > branches/RB_1.0\n> > branches/RB_2.0\n> > tags/REL_1.0\n> > tags/REL_2.0\n> > \n> > Currently, using the -s option you get:\n> > trunk\n> > RB_1.0\n> > RB_2.0\n> > tags/REL_1.0\n> > tags/REL_2.0\n> > \n> > I think it makes sense to have:\n> > trunk\n> > branches/RB_1.0\n> > branches/RB_2.0\n> > tags/REL_1.0\n> > tags/REL_2.0\n> \n> Why? \"trunk\" is just a branch like any other branch, too. It's basically\n> just a svn convention that it's not in branches/ but in its own\n> \"toplevel\" directory. Once imported into git, it's just an ordinary\n> remote tracking branch. It's already pretty well distiguishable from all\n> the other branches due to its name.\n\nYup, you said it better than I could myself :)\n\n> What _does_ make sense is to have a common prefix for all the stuff you\n> got from svn, using for example --prefix=svn/. That way you get:\n> svn/trunk\n> svn/RB_1.0\n> svn/RB_2.0\n> svn/tags/REL_1.0\n> svn/tags/REL_2.0\n> \n> The important part is that those names aren't ambiguous if you have\n> local branch heads called, for example:\n> trunk\n> RB_1.0\n> RB_2.0\n> \n> as the svn/ prefix is part of the shortname for the remote tracking\n> branches. So \"trunk\" is the branch head and \"svn/trunk\" is the remote\n> tracking branch.\n> \n> Btw Eric, is there any reason why there's no prefix used by default?\n> Using the name for the svn-remote as the prefix would make a lot of\n> sense to me.\n\nBackwards compatibility; and that I've been lazy :)\n\nBut I do agree that prefixing \"svn/\" is preferred for tracking new\nrepos.  I seem to recall that git-svn was actually the first user of the\n\"remotes/\" namespace before it was adopted by the rest of git, and with\nSVN, I didn't anticipate more than one remote.\n\n-- \nEric Wong\n"}]}