Author
Christopher Marshall (christopherlmarshall@yahoo.com)
Raw Notes on CVS: complete branching example
#!/bin/bash
# merge example
CWD=$(pwd)
# create a repository
mkdir CVSROOT
export CVSROOT=${CWD}/CVSROOT
cvs init
mkdir p1
# create a project
cd p1
touch A B C
cvs import -m "" p1 vtag rtag
cd $CWD
rm -rf p1
# create a branch
# we need a non-branch working directory to do this from,
# which seems odd at first
cvs checkout p1
cvs tag -b br1 p1
# checkout on the branch
mkdir ${CWD}/branch
cd ${CWD}/branch
cvs checkout -r br1 p1
cd p1
echo "1" > A
cvs commit -m "1" A
# create a working directory we can use to merge
# the branch changes back into the main trunk.
cd $CWD
mkdir merge
cd merge
cvs checkout p1
cd p1
# here is the all important merge step
cvs update -j br1
cvs commit -m "1"
