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

git-svn: importing internal externals

From
JKJohn Koleszar <john.koleszar@on2.com>
Date
May 27, 2009, 16:51 UTC
Message-ID
<1243443089.3192.43.camel@cp-jk-linux.corp.on2.com>
Hi,

I'm working on a one-off import of an SVN repo that makes use of "internal" svn:externals; i.e. all URLs refer to different spots in the same repo, potentially with peg revisions. The SVN repo holds a number of projects, and my plan is to import them into individual git repos, incorporating the history from any svn:external linked sub-projects.

My current strategy is to let git-svn fetch the project as it normally would, then fix up the history on each branch by parsing the unhandled.log with a filter-branch script. I'm currently using an index filter, which works reasonably well, but has the undesired effect of squashing commits on the subproject into commits on the parent project. So if the subproject is modified in rA and rC, and the project in rB and rD, my modified history shows only rB and rD, with rA squashed into rB and rC squashed into rD, when I'd really like to see all 4 commits.

I have a git-svn clone of the whole repo available, and I use that to pull out the missing external objects when recreating history. Maybe a better idea would be to resolve the externals with my index filter on this whole super-repo, where the history is properly linear, then somehow filter the now-populated projects from that. I had originally set aside this idea because I wanted git-svn to do its automagic branch/tag extraction, and while I think I could get a git repo with the svn layout, I'm unsure how to turn that into proper git branches and tags.

Can anyone offer any suggestions on how to achieve this? I'm still new to git, so nothing is jumping out at me. I'd be happy to share my filter script (about 100 lines) if someone wants to see it.

Thanks!
John
Next: Yann Dirson
Message 1 of 4 in “git-svn: importing internal externals”
  1. John KoleszarMay 27, 2009
  2. Yann DirsonMay 28, 2009
  3. John KoleszarMay 29, 2009
  4. Yann DirsonJun 10, 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.