{"thread":{"id":"21646","subject":"git-svn of both trunk and tags while having no access to the 'parent' of those","startedAt":"2009-11-17T02:59:45Z","lastAt":"2009-11-22T23:39:54Z","messageCount":9,"participants":["Yaroslav Halchenko","Michael J Gruber","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127727","messageId":"20091117025945.GE17964@onerussian.com","threadId":"21646","inReplyTo":null,"subject":"git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Yaroslav Halchenko","fromEmail":"debian@onerussian.com","sentAt":"2009-11-17T02:59:45Z","receivedAt":"2009-11-17T02:59:45Z","isPatch":false,"sender":{"key":"debian@onerussian.com","avatar":"https://gravatar.com/avatar/9d2f005048a0274a9c26bc47a51f580e2bf631dfedfdb18370f65e08e4250317?d=mp&s=160"},"body":"Dear Git People,\n\nI've ran into a situation here:\n\nthere is a repository with trunk and releases (analog to tags there)\navailable for public, but the rest of directories and their parent is\nnot available without authentication... ie I can access\n\nhttp://domain.com/svnrepo/trunk\nhttp://domain.com/svnrepo/releases\nbut not\nhttp://domain.com/svnrepo/\n\nWhenever I use git-svn (1.6.5 in Debian):\n\ngit svn clone --prefix=upstream-svn/ -T trunk -t releases http://domain.com/svnrepo svnrepo.gitsvn\n\nit asks for authentication... I guess, now I can only clone trunk and\nreleases separately? or may be there is some way to avoid the\nproblem, ie avoid looking 'into root'?\n\nThanks in advance!\n-- \nYaroslav O. Halchenko\nPostdoctoral Fellow,   Department of Psychological and Brain Sciences\nDartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755\nPhone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419\nWWW:   http://www.linkedin.com/in/yarik        \n"},{"id":"127831","messageId":"4B03B7D3.8050905@drmicha.warpmail.net","threadId":"21646","inReplyTo":"20091117025945.GE17964@onerussian.com","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-11-18T09:01:07Z","receivedAt":"2009-11-18T09:01:07Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Yaroslav Halchenko venit, vidit, dixit 17.11.2009 03:59:\n> Dear Git People,\n> \n> I've ran into a situation here:\n> \n> there is a repository with trunk and releases (analog to tags there)\n> available for public, but the rest of directories and their parent is\n> not available without authentication... ie I can access\n> \n> http://domain.com/svnrepo/trunk\n> http://domain.com/svnrepo/releases\n> but not\n> http://domain.com/svnrepo/\n> \n> Whenever I use git-svn (1.6.5 in Debian):\n> \n> git svn clone --prefix=upstream-svn/ -T trunk -t releases http://domain.com/svnrepo svnrepo.gitsvn\n> \n> it asks for authentication... I guess, now I can only clone trunk and\n> releases separately? or may be there is some way to avoid the\n> problem, ie avoid looking 'into root'?\n> \n> Thanks in advance!\n\nYour problem description seems to match perfectly with the description\nof the \"--no-minimize-url\" option in git svn's man page. I'm sure it's\nworth a try.\n\nMichael\n"},{"id":"127845","messageId":"20091118133205.GB17964@onerussian.com","threadId":"21646","inReplyTo":"4B03B7D3.8050905@drmicha.warpmail.net","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Yaroslav Halchenko","fromEmail":"debian@onerussian.com","sentAt":"2009-11-18T13:32:05Z","receivedAt":"2009-11-18T13:32:05Z","isPatch":false,"sender":{"key":"debian@onerussian.com","avatar":"https://gravatar.com/avatar/9d2f005048a0274a9c26bc47a51f580e2bf631dfedfdb18370f65e08e4250317?d=mp&s=160"},"body":"\nOn Wed, 18 Nov 2009, Michael J Gruber wrote:\n\n> > git svn clone --prefix=upstream-svn/ -T trunk -t releases http://domain.com/svnrepo svnrepo.gitsvn\n\n> Your problem description seems to match perfectly with the description\n> of the \"--no-minimize-url\" option in git svn's man page. I'm sure it's\n> worth a try.\n\n;-) oh I did I did ;)\nI've used\n\ngit svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn\n\nthat initialized repository, went through a lengthy list of \n\ntrace: built-in: git 'config' 'svn-remote.svn.tags-maxRev' '...'\n\nwith last command reported\n\ntrace: built-in: git 'gc' '--auto'\n\nand resulted in nothing being cloned/checked out or even a single ref.\nThe only file under .git besides the ones created by git init\n\n./svn/refs/remotes/upstream-svn/trunk/.rev_map.33fb83da-1015-0410-9b9b-96027f9a4af8\n\nand if I omitted trunk/ from url -- the same story of needed\nauthentication\n\n-- \nYaroslav O. Halchenko\nPostdoctoral Fellow,   Department of Psychological and Brain Sciences\nDartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755\nPhone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419\nWWW:   http://www.linkedin.com/in/yarik        \n"},{"id":"127848","messageId":"4B03FD29.3090001@drmicha.warpmail.net","threadId":"21646","inReplyTo":"20091118133205.GB17964@onerussian.com","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-11-18T13:56:57Z","receivedAt":"2009-11-18T13:56:57Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Yaroslav Halchenko venit, vidit, dixit 18.11.2009 14:32:\n> \n> On Wed, 18 Nov 2009, Michael J Gruber wrote:\n> \n>>> git svn clone --prefix=upstream-svn/ -T trunk -t releases http://domain.com/svnrepo svnrepo.gitsvn\n> \n>> Your problem description seems to match perfectly with the description\n>> of the \"--no-minimize-url\" option in git svn's man page. I'm sure it's\n>> worth a try.\n> \n> ;-) oh I did I did ;)\n> I've used\n> \n> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn\n\nIs the trunk really at svnrepo/trunk/trunk?\n\n> that initialized repository, went through a lengthy list of \n> \n> trace: built-in: git 'config' 'svn-remote.svn.tags-maxRev' '...'\n> \n> with last command reported\n> \n> trace: built-in: git 'gc' '--auto'\n> \n> and resulted in nothing being cloned/checked out or even a single ref.\n> The only file under .git besides the ones created by git init\n> \n> ./svn/refs/remotes/upstream-svn/trunk/.rev_map.33fb83da-1015-0410-9b9b-96027f9a4af8\n> \n> and if I omitted trunk/ from url -- the same story of needed\n> authentication\n\nI would try both\n\ngit svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t\nreleases  http://domain.com/svnrepo/ svnrepo.gitsvn\n\nand also the seemingly equivalent\n\ngit svn clone --no-minimize-url --prefix=upstream-svn/ -T\nhttp://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\nsvnrepo.gitsvn\n\nAlso, I assume you can svn list http://domain.com/svnrepo/trunk and\nhttp://domain.com/svnrepo/releases ;)\n\nMichael\n"},{"id":"127851","messageId":"20091118142332.GC17964@onerussian.com","threadId":"21646","inReplyTo":"4B03FD29.3090001@drmicha.warpmail.net","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Yaroslav Halchenko","fromEmail":"debian@onerussian.com","sentAt":"2009-11-18T14:23:32Z","receivedAt":"2009-11-18T14:23:32Z","isPatch":false,"sender":{"key":"debian@onerussian.com","avatar":"https://gravatar.com/avatar/9d2f005048a0274a9c26bc47a51f580e2bf631dfedfdb18370f65e08e4250317?d=mp&s=160"},"body":"\nOn Wed, 18 Nov 2009, Michael J Gruber wrote:\n> > git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn\n> Is the trunk really at svnrepo/trunk/trunk?\nnope... it is just svnrepo/trunk but if I set url to point to parent --\ngit svn seeks authentication right away\n\n> I would try both\n> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t\n> releases  http://domain.com/svnrepo/ svnrepo.gitsvn\n\nasks for authentication since there is no public access to\nhttp://domain.com/svnrepo/\n\n> and also the seemingly equivalent\n\n> git svn clone --no-minimize-url --prefix=upstream-svn/ -T\n> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\n> svnrepo.gitsvn\nseems to not work since it wants url as a parameter \n\nBad URL passed to RA layer: Illegal repository URL svnrepo.gitsvn  at /usr/lib/git-core/git-svn line 940\n\n> Also, I assume you can svn list http://domain.com/svnrepo/trunk and\n> http://domain.com/svnrepo/releases ;)\nyeap -- I can list both of those but not their parent.\n\n\n-- \nYaroslav O. Halchenko\nPostdoctoral Fellow,   Department of Psychological and Brain Sciences\nDartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755\nPhone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419\nWWW:   http://www.linkedin.com/in/yarik        \n"},{"id":"127855","messageId":"4B040D95.9040901@drmicha.warpmail.net","threadId":"21646","inReplyTo":"20091118142332.GC17964@onerussian.com","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-11-18T15:07:01Z","receivedAt":"2009-11-18T15:07:01Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Yaroslav Halchenko venit, vidit, dixit 18.11.2009 15:23:\n> \n> On Wed, 18 Nov 2009, Michael J Gruber wrote:\n>>> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn\n>> Is the trunk really at svnrepo/trunk/trunk?\n> nope... it is just svnrepo/trunk but if I set url to point to parent --\n> git svn seeks authentication right away\n> \n>> I would try both\n>> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t\n>> releases  http://domain.com/svnrepo/ svnrepo.gitsvn\n> \n> asks for authentication since there is no public access to\n> http://domain.com/svnrepo/\n> \n>> and also the seemingly equivalent\n> \n>> git svn clone --no-minimize-url --prefix=upstream-svn/ -T\n>> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\n>> svnrepo.gitsvn\n> seems to not work since it wants url as a parameter \n> \n> Bad URL passed to RA layer: Illegal repository URL svnrepo.gitsvn  at /usr/lib/git-core/git-svn line 940\n> \n>> Also, I assume you can svn list http://domain.com/svnrepo/trunk and\n>> http://domain.com/svnrepo/releases ;)\n> yeap -- I can list both of those but not their parent.\n> \n> \n\nOK, so the way it's implemented --no-minimize-url might be half as\nuseful as it could be. One last try (before asking Eric...) would be\n\ngit svn clone --no-minimize-url --prefix=upstream-svn/ -T\nhttp://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\nhttp://domain.com/svnrepo/trunk svnrepo.gitsvn\n\nbecause that involves accessible URLs only and trunk and branch URLs are\nabsolute.\n\n[Meanwhile I git the actual URL PMed by Yaroslov.]\n\nSo, what happens with the above is that git-svn tries to set the URL\nconfig again from the URL part of an absolute tags argument. I don't\nknow how absolute URLs (which are documented) for tags etc. could\npossibly work if git-svn tries to do that. Eric?\n\nI tried also with two svn sections to circumvent this:\n\n[svn-remote \"svn\"]\n        url = http://domain.com:/project/trunk\n        fetch = :refs/remotes/trunk\n[svn-remote \"svnr\"]\n        url = http://domain.com:/project/releases\n        tags = /*:refs/remotes/tags/*\n\nFetching -Rsvn works fine, but fetching -Rsvnr gives the same\nauthentication problems. And fetch does not accept --no-minimize-url as\nan option. OTOH: If the option is not used it seems to me (from the\nsource) that not minimizing is the default, which leaves me really\nstomped. Eric?? ;)\n\nMichael\n"},{"id":"127894","messageId":"20091119095307.GA30423@dcvr.yhbt.net","threadId":"21646","inReplyTo":"4B040D95.9040901@drmicha.warpmail.net","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-11-19T09:53:07Z","receivedAt":"2009-11-19T09:53:07Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Michael J Gruber <git@drmicha.warpmail.net> wrote:\n> Yaroslav Halchenko venit, vidit, dixit 18.11.2009 15:23:\n> > \n> > On Wed, 18 Nov 2009, Michael J Gruber wrote:\n> >>> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn\n> >> Is the trunk really at svnrepo/trunk/trunk?\n> > nope... it is just svnrepo/trunk but if I set url to point to parent --\n> > git svn seeks authentication right away\n> > \n> >> I would try both\n> >> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t\n> >> releases  http://domain.com/svnrepo/ svnrepo.gitsvn\n> > \n> > asks for authentication since there is no public access to\n> > http://domain.com/svnrepo/\n> > \n> >> and also the seemingly equivalent\n> > \n> >> git svn clone --no-minimize-url --prefix=upstream-svn/ -T\n> >> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\n> >> svnrepo.gitsvn\n> > seems to not work since it wants url as a parameter \n> > \n> > Bad URL passed to RA layer: Illegal repository URL svnrepo.gitsvn  at /usr/lib/git-core/git-svn line 940\n\nHi Michael, Yaroslav,\n\nI think that second command syntax only works for \"git svn init\" right\nnow, not sure if it ever worked with \"clone\".\n\n> >> Also, I assume you can svn list http://domain.com/svnrepo/trunk and\n> >> http://domain.com/svnrepo/releases ;)\n> > yeap -- I can list both of those but not their parent.\n> > \n> \n> OK, so the way it's implemented --no-minimize-url might be half as\n> useful as it could be. One last try (before asking Eric...) would be\n> \n> git svn clone --no-minimize-url --prefix=upstream-svn/ -T\n> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases\n> http://domain.com/svnrepo/trunk svnrepo.gitsvn\n> \n> because that involves accessible URLs only and trunk and branch URLs are\n> absolute.\n> \n> [Meanwhile I git the actual URL PMed by Yaroslov.]\n\nAny chance I could get that URL?  (I probably won't get a chance to\nspend time debugging this until Friday).  Might be worth it to get an\nstrace or tcpdump to see what exactly is going on.  Or at least some\nprint statements around Git::SVN::Ra::new()...\n\n> So, what happens with the above is that git-svn tries to set the URL\n> config again from the URL part of an absolute tags argument. I don't\n> know how absolute URLs (which are documented) for tags etc. could\n> possibly work if git-svn tries to do that. Eric?\n\nIt looks like support for specifying absolute URLs with \"clone\"\nhas been broken for a while.  Guess I'll need test cases...\n\n> I tried also with two svn sections to circumvent this:\n> \n> [svn-remote \"svn\"]\n>         url = http://domain.com:/project/trunk\n>         fetch = :refs/remotes/trunk\n> [svn-remote \"svnr\"]\n>         url = http://domain.com:/project/releases\n>         tags = /*:refs/remotes/tags/*\n> \n> Fetching -Rsvn works fine, but fetching -Rsvnr gives the same\n> authentication problems. And fetch does not accept --no-minimize-url as\n> an option. OTOH: If the option is not used it seems to me (from the\n> source) that not minimizing is the default, which leaves me really\n> stomped. Eric?? ;)\n\nOdd that the svnr one doesn't work.  Does changing:\n         tags = /*:refs/remotes/tags/*\nto:\n         tags = *:refs/remotes/tags/*\nhelp at all?\n\nMinimizing should be the default in 1.6.5.  I'm a bit stumped, too :x\nI'd like to see what network traffic git svn is sending for\nthe \"svnr\" case vs \"svn ls http://domain.com/project/releases\"\n\n-- \nEric Wong\n"},{"id":"128046","messageId":"20091120204723.GB30423@dcvr.yhbt.net","threadId":"21646","inReplyTo":"20091119095307.GA30423@dcvr.yhbt.net","subject":"Re: git-svn of both trunk and tags while having no access to the 'parent' of those","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-11-20T20:47:23Z","receivedAt":"2009-11-20T20:47:23Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> Michael J Gruber <git@drmicha.warpmail.net> wrote:\n> > I tried also with two svn sections to circumvent this:\n> > \n> > [svn-remote \"svn\"]\n> >         url = http://domain.com:/project/trunk\n> >         fetch = :refs/remotes/trunk\n> > [svn-remote \"svnr\"]\n> >         url = http://domain.com:/project/releases\n> >         tags = /*:refs/remotes/tags/*\n\nHi Yaroslav,\n\nWeird, I'm a bit confused by this myself but I'm out of time\nat the moment, but swapping '[svn-remote \"svn\"]' and \"[svn-remote \"svnr\"]\"\nseems to work, so there's apparently a bug in our handling of\nsvn-remote != \"svn\" somewhere...\n\nSo the following config should work:\n\n[svn-remote \"svnt\"]\n        url = http://domain.com:/project/trunk\n        fetch = :refs/remotes/trunk\n[svn-remote \"svn\"]\n        url = http://domain.com:/project/releases\n        tags = /*:refs/remotes/tags/*\n\nYou should probably run \"git svn fetch -R svnt\" before running\n\"git svn fetch\" to pick up the tagged releases.\n\n-- \nEric Wong\n"},{"id":"128133","messageId":"20091122233954.GA23448@dcvr.yhbt.net","threadId":"21646","inReplyTo":"20091120204723.GB30423@dcvr.yhbt.net","subject":"[PATCH] git svn: always reuse existing remotes on fetch","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-11-22T23:39:54Z","receivedAt":"2009-11-22T23:39:54Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> so there's apparently a bug in our handling of\n> svn-remote != \"svn\" somewhere...\n\n>From 4d0157d6995925ea55ff181ea94d058583333f90 Mon Sep 17 00:00:00 2001\nFrom: Eric Wong <normalperson@yhbt.net>\nDate: Sun, 22 Nov 2009 12:37:06 -0800\nSubject: [PATCH] git svn: always reuse existing remotes on fetch\n\nThe internal no_reuse_existing flag is set to allow initializing\nmultiple remotes with the same URL, common with SVM users.\n\nUnfortunately, this flag caused misbehavior when used\nwith the -R command-line flag for fetching.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 2746895..7f7a56f 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -428,6 +428,7 @@ sub cmd_fetch {\n \tif (@_ > 1) {\n \t\tdie \"Usage: $0 fetch [--all] [--parent] [svn-remote]\\n\";\n \t}\n+\t$Git::SVN::no_reuse_existing = undef;\n \tif ($_fetch_parent) {\n \t\tmy ($url, $rev, $uuid, $gs) = working_head_info('HEAD');\n \t\tunless ($gs) {\n@@ -956,6 +957,7 @@ sub cmd_multi_init {\n }\n \n sub cmd_multi_fetch {\n+\t$Git::SVN::no_reuse_existing = undef;\n \tmy $remotes = Git::SVN::read_all_remotes();\n \tforeach my $repo_id (sort keys %$remotes) {\n \t\tif ($remotes->{$repo_id}->{url}) {\n-- \nEric Wong\n"}]}