Edgewall Software

Changes between Version 9 and Version 10 of TracDev/DevelopmentWorkflow


Ignore:
Timestamp:
Mar 7, 2016, 12:15:10 AM (8 years ago)
Author:
Ryan J Ollos
Comment:

Adapt documentation to what we do in practice.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/DevelopmentWorkflow

    v9 v10  
    1313== Integration in release branches
    1414
    15 We commit bug fixes first on one of the stable branches, eg [source:branches/0.12-stable], then merge the fix to later branches using svn's mergeinfo support.
     15We commit the change first on one of the stable branches, eg [source:branches/0.12-stable], then merge the fix to later branches using svn's mergeinfo support.
    1616
    1717Merging in this direction (//porting// or //forward porting//) makes it quite easy to merge all pending changes from one stable branch to the next, eg [source:branches/0.12-stable 0.12-stable] to [source:branches/1.0-stable 1.0-stable], then to [source:trunk]. This workflow is much simpler than the opposite one, //back porting//, which involves cherry-picking or careful "blocking" of changes which shouldn't be merged back. The SCM tools have generally better support for merging in this forward direction, even Subversion since v1.5.
     18
     19While this pattern of //forward porting// makes it easy to merge all pending changes, in practice we cherry-pick changes as they are committed in order to keep all branches in sync and prevent pending changes from accumulating on a branch.
    1820
    1921Here's a walk through example. We start by hacking on [source:branches/0.12-stable 0.12-stable]:
     
    2426(all is good)
    25270.12-stable$ svn ci -m "0.12.6dev: fixed ... (#xyz)"
     28...
     29Committing transaction...
     30Committed revision 15410.
    2631}}}
    2732
    28 Now we want to port all the pending changes to [source:branches/1.0-stable]:
     33Now we want to the change to [source:branches/1.0-stable]:
    2934{{{#!sh
    30350.12-stable$ cd ../1.0-stable
    31 1.0-stable$ svn merge ^/branches/0.12-stable
     361.0-stable$ svn merge -c 15410 ^/branches/0.12-stable
    32371.0-stable$ make test
    3338...
     
    35401.0-stable$ # some fixes needed for API changes
    36411.0-stable$ svn ci -m "1.0.2dev: Merged from 0.12-stable."
     42...
     43Committing transaction...
     44Committed revision 15411.
    3745}}}
    3846
    39 Now we want to port all the pending changes to [source:trunk]:
     47Now we want to port the change to [source:trunk]:
    4048{{{#!sh
    41491.0-stable$ cd ../trunk
    42 trunk$ svn merge ^/branches/1.0-stable
     50trunk$ svn merge -c 15411 ^/branches/1.0-stable
    4351trunk$ make test
    4452...
     
    4654trunk$ # some fixes needed for API changes
    4755trunk$ svn ci -m "1.1.2dev: Merged from 1.0-stable."
     56...
     57Committing transaction...
     58Committed revision 15412.
    4859}}}
    4960
    5061Among the possible porting related fixes that should be done when porting:
    5162 - Use Python idioms adapted to the minimal version on the branch, eg for Trac 0.12 the baseline is Python 2.4, for Trac 1.0 and trunk it's 2.5; this means that among other things we can use `with ...` as appropriate.
    52  - Use newer APIs and conventions, eg the DatabaseApi#Trac0.13API; see the ApiChanges subpage for the corresponding target branch.
     63 - Use newer APIs and conventions, eg the DatabaseApi#Trac1.0API; see the ApiChanges subpage for the corresponding target branch.
    5364
    54 '''Note''': you can always review what are the pending changes in Trac by looking at the `svn:mergeinfo` property which shows the '''eligible''' set of changesets, when viewing the target branch in the TracBrowser, eg [source:trunk].
     65If a changeset should not be forward ported, for example when extracting new messages to the catalog, the commit should be blocked using a //record only// merge. The //record only// merge is the same as a cherry-pick merge, with the addition of the `--record-only` switch.
     66
     67'''Note''': you can always review the pending changes by viewing the `svn:mergeinfo` property in the TracBrowser, eg [source:trunk], which shows the changesets that are **eligible** for merge to the target branch.
    5568
    5669== Pushing from a DVCS to SVN