public:user_software:documentation:lofarsvn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
public:user_software:documentation:lofarsvn [2016-12-15 09:16] – Document moved from engineering:software:lofarsvn Arno Schoenmakerspublic:user_software:documentation:lofarsvn [2018-11-16 15:18] (current) – [Preparing the reintegration of your TASK! branch with the parent branch] Added a reminder about how to find out what the parent of my task branch is Thomas Jürges
Line 6: Line 6:
 You may wish to consult the online book [[http://svnbook.red-bean.com/|Version Control with Subversion]] for more information about Subversion. You may wish to consult the online book [[http://svnbook.red-bean.com/|Version Control with Subversion]] for more information about Subversion.
  
-** :!: Before reading further, please read the page [[developmentmanagementpolicy|Development Management Policy]] and the document [[http://www.lofar.org/project/lofardoc/document.php?action=dir&docname=LOFAR-ASTRON-PRC-010&major=3|Release Management Procedure]]. **+** :!: Before reading further, please read the page [[engineering:software:developmentmanagementpolicy|Development Management Policy]] and the document [[http://www.lofar.org/project/lofardoc/document.php?action=dir&docname=LOFAR-ASTRON-PRC-010&major=3|Release Management Procedure]]. **
  
  
Line 17: Line 17:
 trunk/ trunk/
 </code> </code>
-These names more or less speak for themselves. Main development is done on the ''trunk''. The ''tags'' directory contains tagged release or development versions; the ''branches'' directory contains release or development branches. See section [[#Development Management Policy]] on this page for details.+These names more or less speak for themselves. Main development is done on the ''trunk''. The ''tags'' directory contains tagged release or development versions; the ''branches'' directory contains release or development branches. See section [[engineering:software#Development Management Policy]] on this page for details.
  
 ===== Accessing the repository ===== ===== Accessing the repository =====
Line 48: Line 48:
 You'd think that subsequently issuing a ''svn co'' without the ''-N'' option would solve your problems, but it does not. Subversion will refuse to do this, because it considers a recursive checkout a different URL. You'd think that subsequently issuing a ''svn co'' without the ''-N'' option would solve your problems, but it does not. Subversion will refuse to do this, because it considers a recursive checkout a different URL.
  
-**Note:** When you want to do a build of one or more LOFAR packages, you can use ''CMake'' to do this for you. Please refer to the [[public:user_software:documentation:lofar-cmake|CMake for LOFAR]] for details.+**Note:** When you want to do a build of one or more LOFAR packages, you can use ''CMake'' to do this for you. Please refer to the [[lofar-cmake|CMake for LOFAR]] for details.
  
 ==== Staying up-to-date ==== ==== Staying up-to-date ====
Line 67: Line 67:
 G  Merged G  Merged
 </code> </code>
-If any conflicts arise, you will need to resolve them. See [[engineering:software:lofarsvn#Handling merge conflicts]].+If any conflicts arise, you will need to resolve them. See [[#Handling merge conflicts]].
  
  
Line 142: Line 142:
 The concepts of branching, tagging and merging may seem intimidating and confusing at first, but do not let you scare away. You should definitely read [[http://svnbook.red-bean.com/en/1.6/svn.branchmerge.html|Chapter 4. Branching and Merging]] of the book [[http://svnbook.red-bean.com/|Version Control with Subversion]] The concepts of branching, tagging and merging may seem intimidating and confusing at first, but do not let you scare away. You should definitely read [[http://svnbook.red-bean.com/en/1.6/svn.branchmerge.html|Chapter 4. Branching and Merging]] of the book [[http://svnbook.red-bean.com/|Version Control with Subversion]]
  
-Branch and tag names must adhere to conventions described on the page [[developmentmanagementpolicy|Release Management Procedure]].+Branch and tag names must adhere to conventions described on the page [[engineering:software:developmentmanagementpolicy|Release Management Procedure]].
  
 ==== Creating a task or release branch ==== ==== Creating a task or release branch ====
Line 224: Line 224:
  
 == Let's merge == == Let's merge ==
 +
 +If you are like me then it is possible that you have forgotten what the parent of your task branch is.  In this case the command
 +<code>
 +svn log --stop-on-copy --verbose | tail -n 20
 +</code>
 +comes handy.  It will tell you what the ancestor of your branch is.
  
 So, let's merge the changes from the trunk (in this example!) into your task branch. Make sure you're at the top-level ''LOFAR'' directory in your checked out task branch before issuing the following command: So, let's merge the changes from the trunk (in this example!) into your task branch. Make sure you're at the top-level ''LOFAR'' directory in your checked out task branch before issuing the following command:
 <code> <code>
-svn merge ^/trunk+svn merge --dry-run ^/trunk
 </code> </code>
-You may wish to use the ''%%--%%dry-run'' option first to see the result of the merge. This will not actually change any files, but will tell you what you can expect and will detect conflicts.+The ''%%--%%dry-run'' option allows you to first to see the result of the merge. This will not actually change any files, but will tell you what you can expect and will detect conflicts.  After you have checked for problems you can issue the same command again but this time without the ''%%--%%dry-run'' option.
  
 If there are any merge conflicts, you need to resolve them. To do so, you will have to run the above merge-command first on your workspace of the task branch. If there are any merge conflicts, you need to resolve them. To do so, you will have to run the above merge-command first on your workspace of the task branch.
  
-Then resolve all of the conflicts (see [[lofarsvn#Handling_merge_conflicts|Handling merge conflicts]] for guidelines).+Then resolve all of the conflicts (see [[#Handling_merge_conflicts|Handling merge conflicts]] for guidelines).
  
 Finally, check-in all changes into your task branch, e.g.:<code> Finally, check-in all changes into your task branch, e.g.:<code>
Line 267: Line 273:
 Now that you've reintegrated your task branch with the parent branch, it's time to delete the obsoleted task branch: Now that you've reintegrated your task branch with the parent branch, it's time to delete the obsoleted task branch:
 <code> <code>
-svn delete ^/branches/LOFAR-Task1718-creation+svn delete ^/branches/LOFAR-Task1718-creation -m "Task #1234: branch LOFAR-Task1718-creation no longer needed"
 </code> </code>
  
Line 300: Line 306:
  
 == Resolve conflicts == == Resolve conflicts ==
-Textual conflicts must be resolved. Tree conflicts are usually related to //mergeinfo//, which can be accepted as ''theirs fully''. [[lofarsvn#handling_merge_conflicts|See below]] for more info on resolving merge conflicts.+Textual conflicts must be resolved. Tree conflicts are usually related to //mergeinfo//, which can be accepted as ''theirs fully''. [[#handling_merge_conflicts|See below]] for more info on resolving merge conflicts.
  
 If you note that there are more changes in the release branch than your own, please find out who committed those changes and resolve the conflicts together. If that is not possible, you can add a revision range to the ''svn merge'' command which contains only your changes (though this is the least preferred option as it forwards the problem to the person who makes the next change to the release branch and needs to merge these into the trunk..!).  If you note that there are more changes in the release branch than your own, please find out who committed those changes and resolve the conflicts together. If that is not possible, you can add a revision range to the ''svn merge'' command which contains only your changes (though this is the least preferred option as it forwards the problem to the person who makes the next change to the release branch and needs to merge these into the trunk..!). 
Line 312: Line 318:
 ==== Handling merge conflicts ==== ==== Handling merge conflicts ====
  
-For guidelines on how to merge changes made in a branch to the trunk, see [[lofarsvn#merging_changes_in_a_release_branch_with_the_trunk|the previous section]].+For guidelines on how to merge changes made in a branch to the trunk, see [[#merging_changes_in_a_release_branch_with_the_trunk|the previous section]].
  
 A merge conflict can occur when two or more people make different changes to the same file. When Subversion encounters a merge conflict (e.g. during an update), it will place specific markers in the original source file.  A merge conflict can occur when two or more people make different changes to the same file. When Subversion encounters a merge conflict (e.g. during an update), it will place specific markers in the original source file. 
Line 368: Line 374:
 ====== References  ====== ====== References  ======
   * [[http://www.lofar.org/project/lofardoc/document.php?action=dir&docname=LOFAR-ASTRON-PRC-010&major=3|Release Management Procedure]]   * [[http://www.lofar.org/project/lofardoc/document.php?action=dir&docname=LOFAR-ASTRON-PRC-010&major=3|Release Management Procedure]]
-  * [[lofarsvnfaq|LOFAR Subversion Frequently Asked Questions]] +  * [[engineering:software:lofarsvnfaq|LOFAR Subversion Frequently Asked Questions]] 
-  * [[lofarsvn4cvs|Subversion for CVS users]] +  * [[engineering:software:lofarsvn4cvs|Subversion for CVS users]] 
-  * [[lofarcvs2svn|How we migrated from CVS to Subversion]]+  * [[engineering:software:lofarcvs2svn|How we migrated from CVS to Subversion]]
   * The [[http://subversion.tigris.org/|Subversion homepage]]   * The [[http://subversion.tigris.org/|Subversion homepage]]
   * The online book [[http://svnbook.red-bean.com/|Version Control with Subversion]]   * The online book [[http://svnbook.red-bean.com/|Version Control with Subversion]]
   * openCollabNet's [[http://subversion.open.collab.net/svnkb/svnkb.html|Subversion Knowledge Base]]   * openCollabNet's [[http://subversion.open.collab.net/svnkb/svnkb.html|Subversion Knowledge Base]]
  • Last modified: 2016-12-15 09:16
  • by Arno Schoenmakers