[Development] Cherry pick fix from Qt5 to Qt 4.8.x

shane.kearns at accenture.com shane.kearns at accenture.com
Fri Jul 27 19:11:45 CEST 2012


There are two ways to do it, using a cherry pick or using a patch file.
The main difficulty is where files have moved around (e.g. tests/auto structure has changes or files moved from src/gui to src/widgets)

In either case, edit the commit message to include the SHA1 of the change you cherry-picked.
If there were non trivial changes, write "back ported from" so reviewers know it's not the same patch that went to qt5.

1. using a cherry pick:

First you need to add the qt 5 submodule repository as a remote to your qt 4 clone, for example
"git remote add qtbase git://qt.gitorious.org/qt/qtbase.git"
If the patch is in a different submodule to qtbase, use that instead.

Next fetch the latest changes and cherry pick
"git fetch qtbase"

Find the commit you need to cherry pick
"git log --author=<whoever made the change> qtbase/master"
"git log --grep=<something in commit message> qtbase/master"

Do the cherry pick
"git cherry-pick -x <git SHA1>"

At this point you may need to resolve merge conflicts e.g. because autotest files have moved.

2. using a patch file

Go to the submodule in your qt5 clone and find the commit you need to cherry pick
"git fetch"
"git log --author=<whoever made the change> origin/master"
"git log --grep=<something in commit message> origin/master"

Create a patch file
"git format-patch -1 <git SHA1>"

Go to your qt4 clone and apply the patch
"git am -3 <patch file>"

If the patch does not apply, you can edit it (e.g. change the paths for autotests before applying the patch)

--


> -----Original Message-----
> From: development-bounces+shane.kearns=accenture.com at qt-project.org
> [mailto:development-bounces+shane.kearns=accenture.com at qt-project.org]
> On Behalf Of Thiago A. CorrĂȘa
> Sent: 27 July 2012 17:35
> To: development at qt-project.org
> Subject: [Development] Cherry pick fix from Qt5 to Qt 4.8.x
>
> Hi,
>
>     I've sent a patch to Qt5 that's already integrated, and I would
> like to cherry pick it for qt 4.8. I haven't found the process
> documented anywhere, could someone point me in the right direction?
>     I must say I'm not very good with Git, so the more details the
> better. Appreciate the help.
>
> Kind Regards,
>      Thiago A. Correa
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development


Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com




More information about the Development mailing list