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

Torgny Nyblom kde at nyblom.org
Sun Nov 28 15:33:17 CET 2010


On Saturday 27 November 2010 22.14.08 Nicolas Alvarez wrote:
> I'm trying to convert the KDevelop QMake plugin:
> 
> http://websvn.kde.org/trunk/playground/devtools/kdevelop4-extra-
> plugins/qmake/?view=log
> 
> (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
> /qmake/qmakebuilder.
> 
> 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-
> 
> subtree.html
> 
> > (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.
> 
> Ideas?

match /trunk/qmakebuilder/
repository kdevelop-qmake
branch master
prefix qmakebuilder/
end match

match /trunk/qmake/
repository kdevelop-qmake
branch master
prefix qmake/
end match

ought to do it.


More information about the Kde-scm-interest mailing list