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

Re: git-svn: importing internal externals

From
Yann Dirson <ydirson@altern.org>
Date
May 28, 2009, 11:25 UTC
Message-ID
<20090528112542.GA24403@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<1243443089.3192.43.camel@cp-jk-linux.corp.on2.com>
On Wed, May 27, 2009 at 12:51:29PM -0400, John Koleszar wrote:
Show 7 quoted lines
> 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.

I have started to work on exactly this, at fetch time instead of as a post-process. I have for now only hooked parsing of the svn:externals properties, and just need to find the time to resume and finish.

My plan on the user side is to provide flags to map svn urls to git urls.
Show 8 quoted lines
> 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.

Yes, this is the main issue for correctness. For this we would have to check, before processing any new commit, if any of the submodules got any intervening commits, and commit them first.

> I'd be happy to share my filter
> script (about 100 lines) if someone wants to see it.
It can be a good idea to share your script nevertheless :)
Best regards,
-- 
Yann
Previous: John KoleszarNext: John Koleszar
Message 2 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.