6 if [ $# -lt 2 -o $# -gt 3 ]; then
7 echo "This creates a new branch in CVS. Usage: $progname parent child <dir>"
13 CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
15 module=$(basename $(<$dir/CVS/Repository))
17 if [ "$module" = "lustre" ] ; then
18 echo >&2 "${progname}: You probably want to branch lustre or portals."
19 echo >&2 "${progname}: Try using ${0} $parent $child lustre"
26 *) parent="b_$parent" ;;
34 if test "$parent" != "HEAD" && test -f $dir/CVS/Tag && "`cat $dir/CVS/Tag`" != "T$parent"; then
35 echo "This script must be run within the $parent branch"
39 echo parent: $parent CHILD: $CHILD child: $child date: $date
41 echo -n "tagging $parent as '${CHILD}_BASE' ...."
42 $CVS rtag -r $parent ${CHILD}_BASE $module
44 echo -n "branching $child at ${CHILD}_BASE' ...."
45 $CVS rtag -b -r ${CHILD}_BASE $child $module
46 echo -n "updating $dir to $child ...."
47 $CVS update -r $child $dir