Changes between Version 32 and Version 33 of HowToBackport
- Timestamp:
- 09/15/19 07:47:22 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToBackport
v32 v33 1 1 == Backporting == 2 2 3 In the GRASS GIS project, we provide the latest stable release branch with bugfixes from trunk(development branch) as much as possible.3 In the GRASS GIS project, we provide the latest stable release branch with bugfixes from !GitHub master (development branch) as much as possible. 4 4 5 5 === Procedure === 6 6 7 Two little helper scripts to make merging between branches easier: 8 * [browser:grass-addons/tools/svn64merge] (kept for rare backports to GRASS GIS 6) 9 * **[browser:grass-addons/tools/svn-merge.sh]** (recommended for any GRASS GIS 7 release branch) 7 See 8 https://trac.osgeo.org/grass/wiki/HowToGit#Backportingtoreleasebranches 10 9 11 To use them, first make sure all branches are up to date (`svn up`) and clean (`svn diff`),12 then `cd` into the '''top''' of the source tree you want to ''pull '''in''' to''. If you try to run it from the module's own subdir it will fail.13 Then run the script named for the branch you want to pull ''from'', followed by the revision number of the change you wish to merge (no leading "r" or [square brackets] around the rev number please). Mind that you might want to run '`svn propdel svn:mergeinfo .`' before doing an untargeted 'svn commit'.14 15 Example:16 {{{17 # make the original edit in trunk18 cd trunk19 svn diff lib/gis/parser.c20 svn up lib/gis/parser.c21 vim lib/gis/parser.c22 svn diff lib/gis/parser.c23 # .. run make; test the change ..24 svn commit -m"libgis: fix of XYZW in parser" lib/gis/parser.c25 # --> note the rev number of this commit for an immediate or future backport26 27 28 # backport fix to the appropriate release branch (e.g. GRASS GIS 7.2.x)29 cd /path/to/grass72_release/30 # be sure to have a locally up-to-date branch31 svn up32 # use svn-merge.sh for the actual merge33 /path/to/grass-addons/tools/svn-merge.sh 12345 # using the rev number from above34 # verify the changes35 svn diff lib/gis/parser.c36 # .. run make; test the change ..37 svn commit -m"libgis: fix of XYZW in parser (trunk, r12345)" lib/gis/parser.c38 }}}39 10 40 11 === Comparing branches === 41 12 13 **Web browser based:** 14 15 You can compare directly on !GitHub. 16 17 **Local comparisons:** 18 42 19 A `diff` tool like Kompare, Kdiff3, or Meld can help. These run the standard UNIX "`diff -u`" utility and show the results in an easy to navigate GUI. 43 20 44 You'll want to tell them to ignore the build files, svn paperworkfiles, compiled binaries, and "Last changed" timestamps on the help pages.21 You'll want to tell them to ignore the build files, git files, compiled binaries, and "Last changed" timestamps on the help pages. 45 22 This is typically done by going into the options and telling it to ignore a list of wildcard'ed path names, and regex filter for the document content. 46 23 47 For example, to compare ` trunk` and `relbr70` using `kdiff3`:48 ''(I used the QT version of Kdiff3, the other tools are similar)''24 For example, to compare `grass_master` and `releasebranch_7_8` using `kdiff3`: 25 ''(I used the QT version of Kdiff3, the other tools work in a similar way)'' 49 26 {{{ 50 cd grass/svn/ 51 svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0 relbr70 52 svn checkout https://svn.osgeo.org/grass/grass/trunk trunk 53 54 kdiff3 relbr70/ trunk/ 27 kdiff3 releasebranch_7_8/ grass_master/ 55 28 }}} 56 29 … … 65 38 * In the "Line-matching preprocessor command:" line add: 66 39 {{{ 67 grep -v "Last changed: $Date: 2"40 grep -v "Last changed: $Date:$" 68 41 }}} 69 42 * ''(this will ignore the $Date:$ svn keywords at the end of the help pages)'' … … 84 57 * make tests 85 58 * only fix bugs, do not introduce new features 86 * only do refactoring in trunk59 * only do refactoring in master 87 60 * ''large and complicated changes can introduce new hard to spot bugs, the idea of the stable branch is to asymptote to zero bugs.'' 88 61 89 62 If the above is unclear, it should be discussed on the developers list. '''If in doubt, ask! ''' 90 63 In this case, a path/diff is appreciated. 91 92 For general advice, see http://svnbook.red-bean.com/en/1.4/svn.branchmerge.copychanges.html