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

Re: git svn's performance on cloning mono's branches/tags...

From
Andreas Ericsson <ae@op5.se>
Date
Jun 26, 2009, 10:57 UTC
Message-ID
<4A44A9A9.6030008@op5.se>
In-Reply-To
<3ace41890906260259o3be005fq6be9d0e2c3f9af66@mail.gmail.com>
Hin-Tak Leung wrote:
Show 39 quoted lines
> On Fri, Jun 26, 2009 at 6:15 AM, Andreas Ericsson<ae@op5.se> wrote:
>> Hin-Tak Leung wrote:
>>> (I'm not on list so please CC) - I am trying to git svn clone mono's
>>> repository, and for some strange reason it is doing a complete check
>>> out from revision 1 all the way to each branch/tag . Is this normal or
>>> am I doing anything wrong? I have git svn clone a few other things
>>> recently (R, ghostscript) and I don't remember git doing this, but R
>>> is quite a normal svn layout and I think I only have ghostcript trunk
>>> (no branch/tag).
>>>
>>> What I did was this: I started out with just git-svn clone trunk
>>> (which generated the first two [now-commented out] lines), then I
>>> thought I also want 2.4 branch so I added the next commented-out
>>> section, and ran 'git svn fetch --all'. Then I thought I like the
>>> whole thing - so I commented out most of it and added the 4 lines as
>>> blow - which is also my current git config.
>>>
>>> The problem is that it seems to treat every tag as a branch,
>> This is normal. SVN makes no real distinction between tags and branches,
>> so git-svn has no way of detecting which is which. SVN also allows
>> committing to "tags", so it doesn't make sense for git to store what
>> SVN calls tags as git tags.
>>
>> As for your other questions, I don't know.
>>
>> --
>> Andreas Ericsson                   andreas.ericsson@op5.se
>> OP5 AB                             www.op5.se
>> Tel: +46 8-230225                  Fax: +46 8-230231
>>
>> Considering the successes of the wars on alcohol, poverty, drugs and
>> terror, I think we should give some serious thought to declaring war
>> on peace.
>>
> 
> I guess my question is two-fold:
> 1) what is the correct/recommended way of adding tags/branches *after*
> already cloning trunk?
> 
I don't know.
Show 11 quoted lines
> 2) the current way of cloning svn repository is quite inefficient -
> for every tag/branch, it does:
> r1 -> rX branch 1
> r1 -> rN tag 1
> r1 -> rY branch 2
> r1 -> rM tag 2
> r1 -> rZ branch 3
> etc
> 
> but I think it is possible to track branches to the point where it
> branches off (when 'svn copy' happens), rather than all the way to r1?
This isn't really a question, but a statement with a question mark.
> And in that sense tags are just very short branches.
> 

Often, yes, but they *can* be committed to. SVN's inability to keep immutable tags is one of the reasons I never looked at it to replace CVS at $dayjob. But I digress..

> The current behavior is quite bandwith consuming for projects with a
> long history and lots of tags, like mono...
> 

Hmm. I've cloned many subversion repositories to git, and I've never seen the issues you're seeing. Perhaps because I always cloned the entire repository the first time, or because I normally do such things over a high-capacity connection, or because I just fire it up and forget about it until it's done.

What happens if you ignore the already-cloned svn tree and just do a new import without trying to continue the old one? Not that I'll actually do anything about it, as I don't have any problems with it, but I'm curious even so ;-)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Hin-Tak LeungNext: Hin-Tak Leung
Message 4 of 10 in “git svn's performance on cloning mono's branches/tags...”
  1. Hin-Tak LeungJun 26, 2009
  2. Andreas EricssonJun 26, 2009
  3. Hin-Tak LeungJun 26, 2009
  4. Andreas EricssonJun 26, 2009
  5. Hin-Tak LeungJun 26, 2009
  6. Hin-Tak LeungJun 27, 2009
  7. Hin-Tak LeungJun 28, 2009
  8. Eric WongJul 2, 2009
  9. Hin-Tak LeungSep 30, 2009
  10. Eric WongOct 1, 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.