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

Re: importing multi-project svn repositories

From
Steven Grimm <koreth@midwinter.com>
Date
May 7, 2007, 18:06 UTC
Message-ID
<463F6A95.30207@midwinter.com>
In-Reply-To
<C05C5EF4-EC68-490B-946E-630117393F4E@drhanson.net>
David Hanson wrote:
> I'd like to import calc at the top level, put calc/tags/foo in git's 
> tags/calc/foo and calc/branches/baz in git's heads/calc/baz. Ditto for 
> calendar, spreadsheet, etc.

Try git-svn rather than git-svnimport. The latter, AFAIK, is no longer really maintained. The former will do what you want pretty easily. You just run it like

git svn clone --prefix=calc/ -T trunk -t tags -b branches \
    http://svn/repo/url/calc gitrepo

and it'll create a git repository called "gitrepo" with the calc project's trunk/tags/branches as git tags. Then do

git svn clone --prefix=spreadsheet/ -T trunk -t tags -b branches \
    http://svn/repo/url/spreadsheet gitrepo

and it will add the spreadsheet branches to the same repo. The "--prefix" option is needed to keep the branch namespaces from overlapping. git-svn will make an attempt to figure out the correct history of the branches and tags relative to the trunk so they look like sane git branches.

If you want to be able to check out calc and spreadsheet simultaneously, then you probably need to use git's submodule support, which is kind of a work in progress at the moment.

-Steve
Previous: David HansonNext: Dave Hanson
Message 2 of 9 in “importing multi-project svn repositories”
  1. David HansonMay 6, 2007
  2. Steven GrimmMay 7, 2007
  3. Dave HansonMay 8, 2007
  4. Deprecate git-svnimport?Steven Grimm, May 8, 2007
  5. minimize_url in git-svn?Junio C Hamano, May 8, 2007
  6. Johannes SchindelinMay 8, 2007
  7. Eric WongMay 8, 2007
  8. Junio C HamanoMay 9, 2007
  9. git-svn: don't attempt to minimize URLs by defaultEric Wong, May 13, 2007

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.