[mapserver-dev] applying bugfixes to multiple branches
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Wed Apr 4 14:25:51 EDT 2012
Should this (and other) workflows be added to the github mapserver wiki? Which reminds me, what should be done with pages on the mapserver trac wiki?
From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of thomas bonfort
Sent: Wednesday, April 04, 2012 12:34 PM
To: MapServer Dev Mailing List
Subject: [mapserver-dev] applying bugfixes to multiple branches
Following the workflow described here
I've setup a script in our repository that changes the way fixes should be applied to stable branches. The aim is to simplify the task of applying a fix to multiple branches. So, in the case where a fix needs to be applied to more than just master, this is the workflow to
- make sure you have an uptodate clone, and that your master and stable branches don't have any uncommited or unpushed changes
- pick the oldest branch your fix applies to (or that you are willing to support), for the example let's say it is branch-5-4
- set your working copy to this branch:
git checkout branch-5-4
- create a temporary branch for your fix
git checkout -b bug1234
- code, test your fix, etc...
git add changd_file.c
git commit -m "fix bug 1234, blabla"
- once the fix is ready merge it into branch-5-4
git checkout branch-5-4
git merge bug1234
- you are now ready to apply this fix in the newer release branches. A script automates this process:
- what the script does is iteratively merge 4-10 into 5-0, then 5-0 into 5-2, etc, up till 6-0 into master. This means your fix is propagated to all newer branches down into master.
- for more complex fixes and/or very old branches, the fix will likely not always apply cleanly from one branch to the next. You'll be returned back to your shell with a message indicating which file has a conflict and asked to manually edit it to resolve. Once you've fixed the conflict, commit your edited file, and rerun the stablemerge.sh script to continue propagating your updated fix to newer branches.
Please try to avoid copy-pasting a fix in multiple branches to accomplish the same task, as it will result in conflicts the next time someone runs the process.
Don't hesitate to ping me if you need help with this.
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
More information about the mapserver-dev