Changeset 2780

Show
Ignore:
Timestamp:
10/23/2008 05:11:35 PM (3 months ago)
Author:
guyer
Message:

Revised instructions to promote use of svnmerge

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svnmerge-integrated deleted
  • trunk/documentation/ADMINISTRATA.txt

    r2570 r2780  
    88Branches 
    99-------- 
     10 
     11.. attention:: 
     12 
     13   svnmerge_ is recommended for all but the most trivial of branches 
    1014 
    1115Break off for radical refactoring:: 
     
    1721    $ cd .. 
    1822    $ svn co $FIPYROOT/branches/$BRANCH 
     23    $ cd $BRANCH 
     24 
     25If using svnmerge_ (*highly* recommended): 
     26 
     27    $ svnmerge.py init 
     28 
     29.. note:: 
     30 
     31   Edit the commit message in `svnmerge-commit-message.txt` to comply with  
     32   TracLink syntax. E.g., change:: 
     33 
     34       Initialized merge tracking via "svnmerge" with revisions "1-2771" from  
     35       svn+ssh://matforge.org/usr/local/svn-fipy-repos/trunk 
     36 
     37   to:: 
     38 
     39       Initialized merge tracking via "svnmerge" with log:trunk@1:2771 
     40 
     41    $ svn ci -F svnmerge-commit-message.txt 
     42    $ rm svnmerge-commit-message.txt 
    1943 
    2044Edit and add to branch:: 
    2145 
    22     $ cd $BRANCH 
    2346    $ emacs ... 
    2447    $ svn ci -m "refactoring_stage_A" 
     
    2952---------------------------------------- 
    3053 
    31 Find the initial (IRN) and latest (LRN) revision numbers from the last  
    32 merge from trunk:: 
    33  
    34     $ cd ../trunk 
    35     $ svn update 
    36  
    37 Set `$LRN` based on the updated revision of trunk 
    38  
    39     $ LRN=... 
    40  
    41     $ svn log $FIPYROOT/branches/$BRANCH --stop-on-copy 
    42      
    43 Look for "`merged trunk changes r${IRN}:${LRN} to ${BRANCH}`" or  
    44 "`merged log:trunk@${IRN}:${LRN} to source:branches/${BRANCH}`" and set `IRN`  
    45 to `${LRN}` from log message, otherwise to the revision at which the branch  
    46 was created. 
    47  
    48     $ IRN=... 
    49  
    50 Merge updated state of trunk to the branch:: 
    51  
    52     $ cd ../$BRANCH 
    53     $ svn merge -r${IRN}:${LRN} $FIPYROOT/trunk 
    54     $ svn diff 
    55  
    56 Resolve any conflicts 
    57  
    58     $ python setup.py test 
    59     $ svn ci -m "merged log:trunk@${IRN}:${LRN} to source:branches/${BRANCH}@${LRN}" 
     54.. attention:: Use svnmerge_ 
     55 
     56    $ svnmerge.py merge 
     57 
     58Review the merge, fix any conflicts. 
     59 
     60.. note:: 
     61 
     62   Edit the commit message in `svnmerge-commit-message.txt` to comply with  
     63   TracLink syntax, as above. 
     64 
     65.. 
     66 
     67Commit the changes 
     68 
     69    $ svn ci -F svnmerge-commit-message.txt 
     70    $ rm svnmerge-commit-message.txt 
     71 
     72.. note::  
     73 
     74   If you're *not* using svnmerge_ for some reason: 
     75 
     76   Find the initial (IRN) and latest (LRN) revision numbers from the last  
     77   merge from trunk:: 
     78 
     79       $ cd ../trunk 
     80       $ svn update 
     81 
     82   Set `$LRN` based on the updated revision of trunk 
     83 
     84       $ LRN=... 
     85 
     86       $ svn log $FIPYROOT/branches/$BRANCH --stop-on-copy 
     87        
     88   Look for "`merged trunk changes r${IRN}:${LRN} to ${BRANCH}`" or  
     89   "`merged log:trunk@${IRN}:${LRN} to source:branches/${BRANCH}`" and set `IRN`  
     90   to `${LRN}` from log message, otherwise to the revision at which the branch  
     91   was created. 
     92 
     93       $ IRN=... 
     94 
     95   Merge updated state of trunk to the branch:: 
     96 
     97       $ cd ../$BRANCH 
     98       $ svn merge -r${IRN}:${LRN} $FIPYROOT/trunk 
     99       $ svn diff 
     100 
     101   Resolve any conflicts 
     102 
     103       $ python setup.py test 
     104       $ svn ci -m "merged log:trunk@${IRN}:${LRN} to source:branches/${BRANCH}@${LRN}" 
    60105     
    61106Refactoring complete: merge branch to the trunk 
    62107----------------------------------------------- 
    63108 
    64 First, follow the instructions for  
    65 `Merging changes from trunk to the branch`_. 
    66  
    67 Find the `HEAD` revision number:: 
    68  
    69109    $ cd trunk 
    70110    $ svn update 
    71     $ HRN=... 
    72  
    73 Merge the branch `HEAD` to trunk:: 
    74  
    75     $ svn merge ${FIPYROOT}/trunk@${HRN} \ 
    76                 ${FIPYROOT}/branches/${BRANCH}@${HRN} 
    77     $ svn diff 
    78  
    79 Resolve any conflicts 
    80  
    81     $ python setup.py test 
    82     $ svn ci -m "merged source:branches/${BRANCH}@${HRN} to source:trunk@${HRN}" 
     111 
     112.. attention:: Use svnmerge_ 
     113 
     114.. attention:: 
     115 
     116   If you haven't previously done so, initialize merge tracking support 
     117 
     118       $ svnmerge.py init ${FIPYROOT}/branches/${BRANCH} 
     119 
     120   .. note:: 
     121 
     122      Edit the commit message in `svnmerge-commit-message.txt` to comply with  
     123      TracLink syntax, as above. 
     124 
     125   Commit the changes 
     126 
     127       $ svn ci -F svnmerge-commit-message.txt 
     128       $ rm svnmerge-commit-message.txt 
     129 
     130Merge the branch to the trunk 
     131 
     132    $ svnmerge.py merge --bidirectional 
     133 
     134.. note:: 
     135 
     136   Edit the commit message in `svnmerge-commit-message.txt` to comply with  
     137   TracLink syntax, as above. 
     138 
     139Commit the changes 
     140 
     141    $ svn ci -F svnmerge-commit-message.txt 
     142    $ rm svnmerge-commit-message.txt 
     143 
     144.. note::  
     145 
     146   If you're *not* using svnmerge_ for some reason: 
     147 
     148   First, follow the instructions for  
     149   `Merging changes from trunk to the branch`_. 
     150 
     151   Record the `HEAD` revision number from the update:: 
     152 
     153       $ HRN=... 
     154 
     155   Merge the branch `HEAD` to trunk:: 
     156 
     157       $ svn merge ${FIPYROOT}/trunk@${HRN} \ 
     158                   ${FIPYROOT}/branches/${BRANCH}@${HRN} 
     159       $ svn diff 
     160 
     161   Resolve any conflicts 
     162 
     163       $ python setup.py test 
     164       $ svn ci -m "merged source:branches/${BRANCH}@${HRN} to source:trunk@${HRN}" 
     165 
    83166 
    84167When completely done with the branch 
    85168 
     169    $ svnmerge.py uninit 
    86170    $ svn delete -m "Refactoring complete. Merged source:branches/${BRANCH} to source:trunk" \ 
    87171        ${FIPYROOT}/branches/${BRANCH} 
     
    368452    $ cd .. 
    369453    $ rm -rf cvs2svnSandbox 
     454 
     455 
     456.. _svnmerge: http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.orcaware.com/svn/wiki/Svnmerge.py