From fe1e9848a850fae559a6b731f3b5c1b39b939820 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sun, 6 Aug 2006 23:19:53 +0000 Subject: Fix broken links and update information in the scons.org Development page. Add a Branching page at tigris.org to describe the branch structure and management. --- www/branching.html | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 www/branching.html diff --git a/www/branching.html b/www/branching.html new file mode 100644 index 0000000..904d368 --- /dev/null +++ b/www/branching.html @@ -0,0 +1,197 @@ + + +SCons Branching and Merging + + + +
+

scons
SCons Branching and Merging

+
+ +

+This page covers how we handle branching and merging +in the SCons development tree. +We'll use +svnmerge +to keep track of what changes haven't been merged in each direction. +Some of the concepts and steps below have been +swiped from a pretty decent +svnmerge howto +created by Ken Kinder, +with liberal help from our Gary Oberbrunner. +

+ +
+ +

Branches

+ +

+These are the SCons development branches and their intended uses. +

+ + + +

+

+ +

How to create a branch off the trunk and initialize it for bi-directional merging

+ +

+This should take place between any branch and its parent +to set up to svnmerge to handle the +tracking as we go forward. +

+ +
+$ export SVN=http://scons.tigris.org/svn/scons
+$ cd my_working_directory/trunk
+$ svn cp $SVN/trunk $SVN/branches/new_branch
+$ svn commit
+$ cd ..
+$ svn co $SVN/branches/new_branch
+$ cd new_branch
+$ svnmerge init -S $SVN/trunk -f commit.txt
+$ cd ../trunk
+$ svnmerge init -S $SVN/branches/new_branch -f commit.txt
+$ svn commit -F commit.txt && rm commit.txt
+$ cd ../new_branch
+$ svn commit -F commit.txt && rm commit.txt
+
+ +

+You can actually do both the svnmerge init +and svn commit on one branch (in one directory) +and then do both on the other branch, +but doing it this way makes both of them end up with +the same revision number in the svnmerge property, +which is nice and symmetric. +

+ +

How to merge changes from the trunk to a development branch

+ +

+This brings a branch in sync with the latest changes that +have made it into the trunk for release +(usually by being promoted from other branches, +we typically don't do work directly on the trunk). +

+ +
+$ export SVN=http://scons.tigris.org/svn/scons
+$ cd my_working_directory/new_branch
+$ svn up
+$ svnmerge avail -b -S $SVN/trunk -l
+$ svnmerge merge -b -S $SVN/trunk -f commit.txt
+$ svn resolved .
+$ svn diff
+$ svn commit -F commit.txt && rm commit.txt
+
+ +

How to merge changes from a development branch to the trunk

+ +

+This promotes the branch changes into the trunk. +Note that you should really +first make sure that your branch has already +merged any changes from the trunk +(see previous section) before doing this, +or else you're likely to overwrite any work +that's already been submitted up. +

+ +
+$ export SVN=http://scons.tigris.org/svn/scons
+$ cd my_working_directory/trunk
+$ svn up
+$ svnmerge avail -b -S $SVN/branches/new_branch -l
+$ svnmerge merge -b -S $SVN/branches/new_branch -f commit.txt
+$ svn resolved .
+$ svn diff
+$ svn commit -F commit.txt && rm commit.txt
+
+ +

+The svn resolved . is there because there will be a +conflict on the svnmerge-integratedproperty +that's attached to the directory to track what changes +have or have not already been merged from the development branch. +

+ +
+ + + -- cgit v0.12