Fullscreen
[Show/Hide Right Column]

Merge a commit from trunk

Say you commit a fix to a trunk (ex.: future 9x), and you want to merge that commit to the stable branch (ex.: 8x).

Since this merge is from a later version (9x) to a older version, it is called a "backport". You can also backport someone else's fix :-)

In this example, we'll merge the commit in from trunk (revision 38634) to 8x

  1. Checkout 8x -> get code
  2. From the 8x directory (you may have to do 'cd 8x')
    Merge revision from trunk to the current checkout (which happens to be branches/8.x)
    svn merge -c 38634 https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk
  3. Test your commit. Be very careful to avoid regressions (This is the stable branch!)
  4. To see what will be committed
    svn diff | more

    If you see any conflicts, it's not a good idea to backport. It means the code has diverged too much.
  5. Commit
    svn commit -m "[bp/r38634] [FIX] Apparently glob(), this can fail on some systems, check required" lib/init/tra.php

    It starts with "[bp/r38634]", which means that it is a backport of a fix/feature commited on trunk at revision 38634. Then it is followed by the original commit message made on trunk. If multiple commits has been made on trunk to fix the same issue, they have to be proposed as one unique commit and the commit message will have multiple lines starting with [bp/r...]


Related:


alias

Page last modified on Thursday 26 January, 2012 04:41:20 UTC

Search Wishes (subject only) [toggle]

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.