Changes between Version 3 and Version 4 of pm-svn-branches


Ignore:
Timestamp:
May 29, 2006 2:46:37 PM (14 years ago)
Author:
andreasw
Comment:

finished first draft

Legend:

Unmodified
Added
Removed
Modified
  • pm-svn-branches

    v3 v4  
    99If you have used CVS before, you know the notion of "branches" and "tags".  In CVS, there are specific commands to organize tags and branches, which can sometimes be confusing.  It is important to understand that subversion works in a different, much easier way.
    1010
    11 Subversion itself does not know about tags and branches.  Instead, one can use the fact that subversion (in constrast to CVS) also keeps revisions of directories, such like for files, and that an {{{svn copy}}} retains the change history for copied files and directories.
     11Subversion itself does not know about tags and branches.  Instead, one can use the fact that subversion (in constrast to CVS) also keeps revisions of directories, just as for files, and that an {{{svn copy}}} retains the change history for copied files and directories.
    1212
    1313By convention, the directory stucture in the svn repository at the very base of a project (say, {{{Prjct}}}), is
     
    6565An {{{svn merge}}} conceptually does an {{{svn diff}}} to get the difference between two copies of the code, and applies the difference as patch to the work copy, in which {{{svn merge}}} is performed, but it is more powerful than just obtaining the {{{diff}}} output and applying the patches yourself, since it will also rename and create files and directories, when this was within the changes that were done between the two copies.
    6666
    67 In the example of maintaining a development branch {{{devel}}} for the active code development, you will have created a new branch {{{devel}}} branch as described above.  ''You should note somewhere, which the revision number was at which you split the development branch from the main {{{trunk}}} branch, or the revision number when you updated the official code release in {{{trunk}}} most recently.''  An easy way to do this is to include the revision number in the {{{commit}}} message when you first submit the new branch, or in the message for the {{{commit}}} when you submit the merges applied to the {{{trunk}}} vesion.
     67In the example of maintaining a development branch {{{devel}}} for the active code development, you will have created a new branch {{{devel}}} branch as described above.  ''You should write down somewhere, which the revision number was at which you split the development branch from the main {{{trunk}}} branch, or the revision number when you updated the official code release in {{{trunk}}} most recently.''  An easy way to do this is to include the revision number in the {{{commit}}} message when you first submit the new branch, or in the message for the {{{commit}}} when you submit the merges applied to the {{{trunk}}} version.  One way to find out the revision number of a working copy, is to type {{{svn update}}}.
     68
     69Say now that you want to update the trunk version to reflect the changes you have made in your develepment branch.  The last change (or  the creation of the development branch) has happened at revision number 123.  In order to merge the changes that happened in the development branch {{{devel}}} into your local copy of the {{{trunk}}} version, you go into the base directory of the {{{trunk}}} version (e.g., {{{Coin-Prjct/trunk}}}, and there you type
     70
     71{{{
     72svn merge -r 123 https://www.coin-or.org/svn/Coin-Prjct/branches/devel
     73}}}
     74
     75This will get all the changes that happened in {{{Coin-Prjct/branches/devel}}} since revision number 123 and apply those changes to your local copy of {{{trunk}}}.  If you have made no local modifications in {{{trunk}}} (and it is a good idea do keep it that way), everything should just work fine.  If you have local modification in your {{{trunk}}} copy, you might encounter conflicts that you have to resolve, just as if you have done an {{{svn commit}}} and encountered conflicts (see the description of {{{svn commit}} [wiki:pm-svn-cmds here]).