Changes between Version 8 and Version 9 of pm-svn-branches
- Timestamp:
- Oct 9, 2006 6:17:19 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pm-svn-branches
v8 v9 1 = THIS PAGE IS IN TRANSITION OF BEING REWRITTEN = 2 1 3 = Understanding Branches and Tags = 2 4 … … 5 7 A '''''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. 6 8 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.'''9 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. 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]. 8 10 9 11 In 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. … … 13 15 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, just as for files, and that an {{{svn copy}}} retains the change history for copied files and directories. 14 16 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}}}), is17 '''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 16 18 {{{ 17 19 Prjct ---- trunk … … 33 35 == Creating New Branches and Tags == 34 36 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}}}.37 In 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}}}. 36 38 37 39 You 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 … … 39 41 {{{ 40 42 svn 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" 43 45 }}} 44 46 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. 47 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. '''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 50 Path: trunk 51 URL: https://projects.coin-or.org/svn/Prjct/trunk 52 Repository Root: https://projects.coin-or.org/svn/Prjct 53 Repository UUID: ef2a96d0-92f8-0310-a3c1-cdaa70078a94 54 Revision: 450 55 Node Kind: directory 56 Last Changed Author: joedoe 57 Last Changed Rev: 443 58 Last Changed Date: 2006-07-20 10:49:03 -0400 (Thu, 20 Jul 2006) 59 }}} 60 Look for the line starting with "{{{Revision:}}}" in the output. 46 61 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 as62 If 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 48 63 49 64 {{{ 50 svn co https://projects.coin-or.org/svn/Prjct/ branches/devel Coin-Prjct-devel65 svn co https://projects.coin-or.org/svn/Prjct/stable/2.5 Coin-Prjct-stable-2.5 51 66 }}} 52 67 53 This will create a subdirectory {{{Coin-Prjct- devel}}} (or however you name it) in which you can work.68 This will create a subdirectory {{{Coin-Prjct-stable-2.5}}} (or however you name it) in which you can work. 54 69 55 70 At 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.