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

Nicolas Alvarez nicolas.alvarez at gmail.com
Tue Nov 30 05:17:16 CET 2010


Torgny Nyblom wrote:
> 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:
>>> [snip]
>> 
>> 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.

This worked fine. However, I'm getting into trouble with branches...

My basic rules for the pre-project-merge history look like this:

match /trunk/KDE/kdevelop/projectmanagers/qmake/
  repository kdev-qmake
  branch master
  prefix qmake/
end match

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

Now, there is a branch of qmake alone, also made before qmakebuilder
got moved into qmake:

match /branches/work/kdevelop-qmake-duchain/
  repository kdev-qmake
  branch duchain
  prefix qmake/
end match

This works great for the qmake directory; however, the first git commit to 
the duchain branch deletes everything from qmakebuilder. I can't figure out 
how to get the qmakebuilder files to keep appearing in the duchain branch 
unmodified.

But now I'm also wondering if that's desirable. Should 'qmakebuilder' appear 
in the branch or not? You could argue that it shouldn't, since the branch 
was only for the 'qmake' directory. I just think it looks weird to have all 
of qmakebuilder deleted at the beginning of the branch...

-- 
Nicolas

(I read mailing lists through Gmane. Please don't Cc me on replies; it makes 
me get one message on my newsreader and another on email.)



More information about the Kde-scm-interest mailing list