This example explains how to merge 4f894cb54 into the release-v3.5.0 branch.
Normally patch releases are done via either merging the feature branch in to the release branch, or by cherry-picking the individual commits into the release branch. In this case the source files were moved by (in general terms) removing the Code/Mantid
levels of the repository to be more consistent with other CMake based projects. The effect is that changes made based off of master
cannot be simply cherry-pick
ed into the release branch.
Here is a cumbersome way to "make it work."
git format-patch 4f894cb54b0f9c5c2fe9629876289f0180f2c8a4 -1
will generate a patch file called0001-Updating-Mantid.properties.template.patch
- Edit
0001-Updating-Mantid.properties.template.patch
and change all occurences ofFramework/Properties
withCode/Mantid/Framework/Properties
- Apply the patch using the original commiter's information
git am 0001-Updating-Mantid.properties.template.patch
- Declare victory
$ git log -n 2
commit 61f65e2b7a03005531a1d99fad5198ad98709bc3
Author: Andrei Savici <saviciat@ornl.gov>
Date: Tue Nov 3 15:08:12 2015 -0500
Updating Mantid.properties.template
Fixes #14260
commit 2d851e28b2f0763329ca4dc763a9af1ca5872b4e
Author: Pete Peterson <petersonpf@ornl.gov>
Date: Tue Nov 3 14:58:28 2015 -0500
Commenting out patch version
This was modified from this stack overflow answer.
In this particular case there is a --directory
argument that can be supplied to git-am
to help track down the file to patch. This changes the process to
git format-patch 4f894cb54b0f9c5c2fe9629876289f0180f2c8a4 -1
will generate a patch file called0001-Updating-Mantid.properties.template.patch
. If you want a bunch of commits, use the--start-number
option to create them all then apply using normal globbing.- Apply the patch using the original commiter's information
git am --directory=Code/Mantid 0001-Updating-Mantid.properties.template.patch
- Declare victory