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

# create a project
cd $CWD
mkdir p1
cd ${CWD}/p1
touch A B C
cvs import -m "" p1 vtag rtag
cd $CWD
rm -rf p1

# checkout main working copy, create branch
cd ${CWD}
mkdir main; cd main; cvs checkout p1;
cvs tag -b br1 p1

# checkout branch working copy
cd ${CWD}
mkdir branch; cd branch; cvs checkout -r br1 p1

# add a file to main
cd ${CWD}/main/p1
touch D
cvs add D
cvs commit -m "" D

# add a file to branch
cd ${CWD}/branch/p1
touch D
cvs add D
cvs commit -m "" D

# make a change to the branch
cd ${CWD}/branch/p1
echo "1" > A
cvs commit -m "1" A

# merge branch into main
cd ${CWD}/main/p1
cvs update -j br1
cvs commit -m "1"

# test the main trunk
cd ${CWD}
mkdir test; cd test; cvs checkout p1

hopeless_linux: RawNotes/cvs branching example1 (last modified 2007-07-01 16:01:00)