Changes between Version 8 and Version 9 of pm-svn-branches


Ignore:
Timestamp:
Oct 9, 2006 6:17:19 PM (13 years ago)
Author:
andreasw
Comment:

intermediate save

Legend:

Unmodified
Added
Removed
Modified
  • pm-svn-branches

    v8 v9  
     1= THIS PAGE IS IN TRANSITION OF BEING REWRITTEN =
     2
    13= Understanding Branches and Tags =
    24
     
    57A '''''tag''''' is a name that is given by the project maintainer to a particular revision of the code in a repository, so that one can easily retrieve it without having to specify a revision number.  Typically, one might want to give tags to stable versions of the code.
    68
    7 A '''''branch''''' is a specific "line" of code development.  One always has a main branch, which contains the main development branch.  In subversion, this main development branch is by convention called '''''trunk'''''.  But it is a very good idea, and we highly recommend this, to maintain stable branches, which allow the common user to work with a recent version of the code, without being disturbed by every single change and intermediate unstable version.  '''[wiki:pm-svn-releases Here] we discuss the recommended way to handle a project's repository in terms of stable branches and official point releases.'''
     9A '''''branch''''' is a specific "line" of code development.  One always has a main branch, which contains the main development branch.  In subversion, this main development branch is by convention called '''''trunk'''''.  But it is a very good idea, and we highly recommend this, to maintain stable branches, which allow the common user to work with a recent version of the code, without being disturbed by every single change and intermediate unstable version.  The recommended way to handle a project's repository in terms of stable branches and official point releases is discussed [wiki:pm-svn-releases here].
    810
    911In the trunk development branch one can safely continue to work, possily sharing the changes with other developers, and if a new stable version has been obtained, the changes can be '''''merged''''' to a stable branch.
     
    1315Subversion 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.
    1416
    15 Project managers are encouraged to follow the [wiki:pm-svn-releases COIN release management policy].  In this case, the directory structure in the svn repository at the very base of a project (say, {{{Prjct}}}), is
     17'''Project managers are encouraged to follow the [wiki:pm-svn-releases COIN release management policy].'''  In this case, the directory structure in the svn repository at the very base of a project (say, {{{Prjct}}}), is
    1618{{{
    1719Prjct ---- trunk
     
    3335== Creating New Branches and Tags ==
    3436
    35 In the {{{trunk}}} directory should be the current official release of the project, i.e., the stuff that you want users to download.  If you want to create a new branch, say a development branch called {{{devel}}} from the current {{{trunk}}} version, you use {{{svn copy}}} to create a copy of {{{trunk}}} in a new subdirectory (in the svn repository) under {{{branches}}}.
     37In the {{{trunk}}} directory should be the current main development version of the project, i.e., the stuff that the project manager and other developers work on.  If you want to create a new branch, say a new stable branch called {{{stable/2.5}}} from the current {{{trunk}}} version, you use {{{svn copy}}} to create a copy of {{{trunk}}} in a new subdirectory (in the svn repository) under {{{stable}}}.
    3638
    3739You can do this without having to use a local copy of the entire repository by specifying URLs for both the source and the destination of the copy.  For the {{{Prjct}}} example project, you would do this with
     
    3941{{{
    4042svn copy https://projects.coin-or.org/svn/Prjct/trunk \
    41          https://projects.coin-or.org/svn/Prjct/branches/devel \
    42          -m "Creating devel branch"
     43         https://projects.coin-or.org/svn/Prjct/stable/2.5 \
     44         -m "Creating branch stable/2.5 from revision 450"
    4345}}}
    4446
    45 Since this is a write action to the repository, you will need to provide a message that logs the change you are doing (this is what the "{{{-m}}}" flag is for).  If you omit this flag, your default editor will open and ask you to provide the log message.
     47Since this is a write action to the repository, you will need to provide a message that logs the change you are doing (this is what the "{{{-m}}}" flag is for).  If you omit this flag, your default editor will open and ask you to provide the log message.  '''Here it is highly recommended to include the current repository revision number of the repository in the commit message.'''  You can use the {{{svn info}}} command to determine this number; in case of the above example you can do:
     48{{{
     49>$ svn info https://projects.coin-or.org/svn/Prjct/trunk
     50Path: trunk
     51URL: https://projects.coin-or.org/svn/Prjct/trunk
     52Repository Root: https://projects.coin-or.org/svn/Prjct
     53Repository UUID: ef2a96d0-92f8-0310-a3c1-cdaa70078a94
     54Revision: 450
     55Node Kind: directory
     56Last Changed Author: joedoe
     57Last Changed Rev: 443
     58Last Changed Date: 2006-07-20 10:49:03 -0400 (Thu, 20 Jul 2006)
     59}}}
     60Look for the line starting with "{{{Revision:}}}" in the output.
    4661
    47 If you now want to check out the development branch {{{devel}}} to be able to make changes and submit them back to the {{{devel}}} branch, you specify the corresponding directory in the repository in your {{{svn checkout}}} command, such as
     62If you now want to check out the stable branch {{{stable/2.5}}} to be able to make changes and submit them back to the branch, you specify the corresponding directory in the repository in your {{{svn checkout}}} command, such as
    4863
    4964{{{
    50 svn co https://projects.coin-or.org/svn/Prjct/branches/devel Coin-Prjct-devel
     65svn co https://projects.coin-or.org/svn/Prjct/stable/2.5 Coin-Prjct-stable-2.5
    5166}}}
    5267
    53 This will create a subdirectory {{{Coin-Prjct-devel}}} (or however you name it) in which you can work.
     68This will create a subdirectory {{{Coin-Prjct-stable-2.5}}} (or however you name it) in which you can work.
    5469
    5570At a later point you probably want to transfer the changes you made in the development branch over to the main release {{{trunk}}} branch.  For this you use {{{svn merge}}} as described further below.