git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn of both trunk and tags while having no access to the 'parent' of those

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 19, 2009, 09:53 UTC
Message-ID
<20091119095307.GA30423@dcvr.yhbt.net>
In-Reply-To
<4B040D95.9040901@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 23 quoted lines
> Yaroslav Halchenko venit, vidit, dixit 18.11.2009 15:23:
> > 
> > On Wed, 18 Nov 2009, Michael J Gruber wrote:
> >>> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t releases  http://domain.com/svnrepo/trunk svnrepo.gitsvn
> >> Is the trunk really at svnrepo/trunk/trunk?
> > nope... it is just svnrepo/trunk but if I set url to point to parent --
> > git svn seeks authentication right away
> > 
> >> I would try both
> >> git svn clone --no-minimize-url --prefix=upstream-svn/ -T trunk -t
> >> releases  http://domain.com/svnrepo/ svnrepo.gitsvn
> > 
> > asks for authentication since there is no public access to
> > http://domain.com/svnrepo/
> > 
> >> and also the seemingly equivalent
> > 
> >> git svn clone --no-minimize-url --prefix=upstream-svn/ -T
> >> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases
> >> svnrepo.gitsvn
> > seems to not work since it wants url as a parameter 
> > 
> > Bad URL passed to RA layer: Illegal repository URL svnrepo.gitsvn  at /usr/lib/git-core/git-svn line 940
Hi Michael, Yaroslav,

I think that second command syntax only works for "git svn init" right now, not sure if it ever worked with "clone".

Show 16 quoted lines
> >> Also, I assume you can svn list http://domain.com/svnrepo/trunk and
> >> http://domain.com/svnrepo/releases ;)
> > yeap -- I can list both of those but not their parent.
> > 
> 
> OK, so the way it's implemented --no-minimize-url might be half as
> useful as it could be. One last try (before asking Eric...) would be
> 
> git svn clone --no-minimize-url --prefix=upstream-svn/ -T
> http://domain.com/svnrepo/trunk -t http://domain.com/svnrepo/releases
> http://domain.com/svnrepo/trunk svnrepo.gitsvn
> 
> because that involves accessible URLs only and trunk and branch URLs are
> absolute.
> 
> [Meanwhile I git the actual URL PMed by Yaroslov.]

Any chance I could get that URL? (I probably won't get a chance to spend time debugging this until Friday). Might be worth it to get an strace or tcpdump to see what exactly is going on. Or at least some print statements around Git::SVN::Ra::new()...

> So, what happens with the above is that git-svn tries to set the URL
> config again from the URL part of an absolute tags argument. I don't
> know how absolute URLs (which are documented) for tags etc. could
> possibly work if git-svn tries to do that. Eric?

It looks like support for specifying absolute URLs with "clone" has been broken for a while. Guess I'll need test cases...

Show 14 quoted lines
> I tried also with two svn sections to circumvent this:
> 
> [svn-remote "svn"]
>         url = http://domain.com:/project/trunk
>         fetch = :refs/remotes/trunk
> [svn-remote "svnr"]
>         url = http://domain.com:/project/releases
>         tags = /*:refs/remotes/tags/*
> 
> Fetching -Rsvn works fine, but fetching -Rsvnr gives the same
> authentication problems. And fetch does not accept --no-minimize-url as
> an option. OTOH: If the option is not used it seems to me (from the
> source) that not minimizing is the default, which leaves me really
> stomped. Eric?? ;)
Odd that the svnr one doesn't work.  Does changing:
         tags = /*:refs/remotes/tags/*
to:
         tags = *:refs/remotes/tags/*
help at all?

Minimizing should be the default in 1.6.5. I'm a bit stumped, too :x I'd like to see what network traffic git svn is sending for the "svnr" case vs "svn ls http://domain.com/project/releases"

-- 
Eric Wong
Previous: Michael J GruberNext: Eric Wong
Message 7 of 9 in “git-svn of both trunk and tags while having no access to the 'parent' of those”
  1. Yaroslav HalchenkoNov 17, 2009
  2. Michael J GruberNov 18, 2009
  3. Yaroslav HalchenkoNov 18, 2009
  4. Michael J GruberNov 18, 2009
  5. Yaroslav HalchenkoNov 18, 2009
  6. Michael J GruberNov 18, 2009
  7. Eric WongNov 19, 2009
  8. Eric WongNov 20, 2009
  9. git svn: always reuse existing remotes on fetchEric Wong, Nov 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.