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

Re: git-svn with big subversion repository

From
JMJason Miller <jason@milr.com>
Date
Mar 11, 2011, 00:32 UTC
Message-ID
<20110311003255.GA13814@home.jasonmmiller.org>
In-Reply-To
<C99D031D.D0D9%jkristian@linkedin.com>

On 18:14 Wed 09 Mar , John Kristian wrote: Mr Kristian:

> Thanks for sharing your experience.  After patching git-svn, were you able to clone your subversion repository?

Indeed I was, it took about 48 hours to to the initial import. However, I forgot to mention one other important thing that was a problem.

There is a pattern in svn of doing the following:

/trunk/module1 /trunk/module2 /trunk/module3

Then some branches will be like this:
	svn cp /trunk/ /branches/mybranch1
and others might be:
	svn cp /trunk/module2 /brancyes/mybranchofmodule2

If this hasn't ever been done on your repository, you can stop reading now.

There is no way to represent this in Git directly, so the correct thing to do here is to create a git repository for each module. Now the hard thing is telling git-svn how to handle this. I ended up writing a python script that reads in the SVN changelog and finds all of the children of e.g. /trunk/module1. Any that were copied from /trunk, it appends "/module1" to the path, and any that were copied from /trunk/module1, it leaves alone. This then goes in the git configuration file as the list of branches to fetch.

-Jason
Previous: Jason Miller
Message 6 of 6 in “git-svn with big subversion repository”
  1. John KristianMar 2, 2011
  2. Thomas Ferris NicolaisenMar 2, 2011
  3. Phil HordMar 3, 2011
  4. Florian WeimerMar 5, 2011
  5. Jason MillerMar 9, 2011
  6. Jason MillerMar 11, 2011

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.