[Kde-scm-interest] Re: converting QMake plugin (was: importing subproject history)

Nicolas Alvarez nicolas.alvarez at gmail.com
Sun Nov 28 02:14:08 CET 2010

I'm trying to convert the KDevelop QMake plugin:


(That's the current path, it moved around a lot in previous revisions.)

'qmakebuilder' used to be in a separate directory, usually a sibling of 
'qmake' (other times a 'cousin' directory). Later, it was moved into 

I want to get the full history of both.

Oswald Buddenhagen wrote:
> just read this question on irc, and i suppose more people run into it:
> a subproject has been developed in a separate subtree and was later
> moved into the project which is being converted now. a straight history
> is obviously not able to represent that. the solution:
> - convert the history of the subproject separately up to the point where
>   it moves into the main project
> - make an interactive rebase of the main project and make it stop at the
>   commit where the subproject moves into it (mark the commit for edit,
>   obviously)
> - note that sha1, then throw the commit away with reset --hard HEAD~1
> - git remote add -f subproject1 /path/to/subproject1
> - git merge -s ours --no-commit subproject1/master
> - git cherry-pick <remembered sha1>
> - git rebase --continue
> this is a variation of a subtree merge - see
> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-
> (you'll need that for later subproject merges anyway, so read it ;).

The problem with this solution is that there are many SVN commits that touch 
both qmake and qmakebuilder, and I'd like to keep those as atomic git 
commits too.

I thought of putting 'qmake' and 'qmakebuilder' as directories in the git 
repo, corresponding to the two projects in SVN. Then, in r972147, all files 
under qmake would move to the root of the git repo, and files in 
qmakebuilder would stay there. But I have no idea how to do this in svn2git, 
or if it's possible at all.



More information about the Kde-scm-interest mailing list