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

Re: Efficient cloning from svn (with multiple branches/tags subdirs)

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 14, 2009, 18:00 UTC
Message-ID
<20091014180013.GA24741@dcvr.yhbt.net>
In-Reply-To
<32541b130910140928jdac0187x754423e8d5c64e53@mail.gmail.com>
Avery Pennarun <apenwarr@gmail.com> wrote:
Show 25 quoted lines
> On Wed, Oct 14, 2009 at 2:03 AM, Eric Wong <normalperson@yhbt.net> wrote:
> > Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk> wrote:
> >> What surprises me is that it looks like it's looping over and over,
> >> since sometimes it starts back from SVN revision 1 when it's trying to
> >> import a new tag.
> >
> > Yeah, that's an unfortunate thing about the flexibility of Subversion,
> > basically anything can be a "tag" or a directory and it's extremely
> > hard for git svn to support any uncommon cases for tags/branches
> > out-of-the box, so the manual config editing is needed.
> 
> I've been thinking about this myself for some time.  One option that
> might be "interesting" would be to just grab the *entire* svn tree
> (from the root), and then use git-subtree[1] to slice and dice it into
> branches using your local copy of git (which is fast and uses no
> bandwidth) instead of during the svn fetch (which is slow and uses
> lots of bandwidth).  I think it would also simplify the git-svn code
> quite a lot, at least for fetching, since there would always be a
> global view of the tree and SVN things like "copy branch A to tag B"
> would just be exactly that.
> 
> Of course I have no time to code this up myself, so I apologize for
> just dumping ideas on you without code behind them.  If this inspires
> anyone, I'd be happy to help with any missing features (or
> documentation) this exposes in git-subtree, though.
This was actually the original use case of git svn back when I started.
  git svn clone SVNREPO_ROOT   (without --stdlayout)

It's still an option if you have the disk space for the working copies, but I had to create the branches/tags support since the working copies would be become prohibitively large. If git-subtree could be taught to work on a bare repo (git svn has a --no-checkout option) it might be an option, too.

Show 5 quoted lines
> Have fun,
> 
> Avery
> 
> [1] http://github.com/apenwarr/git-subtree
-- 
Eric Wong
Previous: Avery PennarunNext: Avery Pennarun
Message 5 of 9 in “Efficient cloning from svn (with multiple branches/tags subdirs)”
  1. Bruno HarbulotOct 13, 2009
  2. Eric WongOct 14, 2009
  3. Bruno HarbulotOct 14, 2009
  4. Avery PennarunOct 14, 2009
  5. Eric WongOct 14, 2009
  6. Avery PennarunOct 14, 2009
  7. Bruno HarbulotOct 15, 2009
  8. B Smith-MannschottOct 15, 2009
  9. Bruno HarbulotOct 16, 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.