Re: git-svn: importing internal externals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 27, 2009 at 12:51:29PM -0400, John Koleszar wrote:
> 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.


> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]