Commit bc47cea5 authored by hrchilds's avatar hrchilds

Merge RC trunk into trunk

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@1334 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6cefde06
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Sat Jun 23 15:47:53 PDT 2007
# Added support for RC branches.
#
# *****************************************************************************
issueHelp="no"
......@@ -132,7 +135,11 @@ function checkout_dir
fi
current="notFound"
if [[ ! -f Rev_fromTrunk ]] ; then
echo "Cannot locate file Rev_fromTrunk ... is this a valid branch?"
if [[ ! -f Rev_fromRCTrunk ]] ; then
echo "Cannot locate file Rev_fromTrunk ... is this a valid branch?"
else
current=$(cat Rev_fromRCTrunk)
fi
else
current=$(cat Rev_fromTrunk)
fi
......
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Sat Jun 23 16:47:06 PDT 2007
# Disallow merging from an RC branch to the trunk.
#
# *****************************************************************************
issueHelp="no"
......@@ -105,7 +108,23 @@ cd tmp_forRev$$
svn co ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}/svninfo
cd svninfo
REV=$(cat Rev_toTrunk)
isRC="no"
if [[ -f Rev_toRCTrunk ]] ; then
isRC="yes"
fi
cd ../..
if [[ "$isRC" == "yes" ]] ; then
echo ""
echo "I believe the branch you are trying to merge from is an RC branch."
echo ""
echo "RC branches must be merged onto the RC trunk."
echo "The RC trunk can then be merged to using merge_rctrunk_to_trunk."
echo ""
echo "Aborting!"
echo ""
rm -Rf tmp_forRev$$
exit 1
fi
echo ""
echo "The revision of the last merge was $REV"
echo ""
......
#!/bin/ksh
#
# Script: merge_rcbranch_to_rctrunk
#
# Purpose:
# Merges a RC branch into the RC trunk
#
# Programmer: Hank Childs
# Creation: June 23, 2007
#
# Modifications:
#
# *****************************************************************************
issueHelp="no"
P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
# Prevent print statements when changing directories
CDPATH=""
BRANCH=""
BRANCHNAME=""
if [[ $# != 1 ]] ; then
issueHelp="yes"
elif [[ "$1" == "-help" || "$1" == "-h" || "$1" == "-?" ]] ; then
issueHelp="yes"
elif [[ ! -f .branchname ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
issueHelp="yes"
elif [[ ! -f .rootpath ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
issueHelp="yes"
else
T2=$(cat .branchname)
TRUNKNAME=${T2#*RC_} # strip off 1.6.1RC_trunk to make trunk
if [[ "$TRUNKNAME" != "trunk" ]] ; then
echo "You must be in the trunk when you run this script"
echo ""
issueHelp="yes"
fi
WHOLE_TRUNK="yes"
ROOTPATH=$(cat .rootpath)
if [[ "$ROOTPATH" != "/" ]] ; then
WHOLE_TRUNK="no"
else
if [[ ! -d src || ! -d data || ! -d docs || ! -d test || ! -d third_party || ! -d windowsbuild ]] ; then
WHOLE_TRUNK="no"
fi
fi
if [[ "$WHOLE_TRUNK" == "no" ]]; then
echo "Your checkout is not of the entire trunk. The merge will only "
echo "take place over your checkout. If you continue, any changes that "
echo "are on directories not in your current checkout of the trunk will be lost!"
stop="no"
while [[ "$stop" == "no" ]] ; do
echo "Do you want to continue? [yes/no]"
read answer
if [[ "$answer" == "yes" ]] ; then
stop="yes"
fi
if [[ "$answer" == "no" ]] ; then
stop="yes"
fi
done
if [[ "$answer" == "no" ]] ; then
exit 1
fi
fi
BRANCHNAME=$1
BRANCH=${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}${ROOTPATH}
svn ls $BRANCH 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "The branch $1 does not appear to exist."
echo "(Looking for it at $BRANCH)"
echo "Try using the script ls_branches to locate your branch."
issueHelp="yes"
fi
fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} <branch>"
echo ""
echo "Example: ${0##*/} my_rc_dev_work"
echo "\tshould be run at the top level of your checked out RC trunk. It will "
echo "\tmerge the work from my_rc_dev_work into the RC trunk."
echo ""
exit 1
fi
echo ""
echo "Merging $BRANCH into the trunk"
echo ""
echo ""
echo "Getting record of last merge from this branch into the trunk..."
mkdir tmp_forRev$$
cd tmp_forRev$$
svn co ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}/svninfo
cd svninfo
if [[ ! -f Rev_toRCTrunk ]] ; then
REV="not_found"
else
REV=$(cat Rev_toRCTrunk)
fi
cd ../..
if [[ "$REV" == "not_found" ]] ; then
echo "Could not locate file Rev_toRCTrunk."
echo "I do not believe this is an RC branch."
echo "Aborting"
exit 1
fi
echo ""
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
echo ""
svn merge -r ${REV}:HEAD ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}/${ROOTPATH}/$i
cd ..
fi
done
NEW_REV=$(get_latest_rev)
cd tmp_forRev$$/svninfo
echo "$NEW_REV" > Rev_toRCTrunk
echo ""
echo "Updating branch $BRANCHNAME to contain a record of this merge"
echo ""
svn commit -m "Update for revision sent to trunk from $BRANCHNAME, $REV to $NEW_REV"
cd ../..
rm -Rf tmp_forRev$$
echo ""
echo "The changes from the branch $BRANCHNAME have been put on your working copy."
echo "You need to review the changes and do an \"svn commit\" for these changes "
echo "to be saved. Note that the branch has been updated with the info that this "
echo "merge took place and future merges into the trunk will not attempt to merge "
echo "these revisions again. If you want to back out this merge, you will need "
echo "invoke the following command to update our bookkeeping: "
echo ""
echo " set_branch_to_trunk_revision $BRANCHNAME $REV RC"
echo ""
return 0
#!/bin/ksh
#
# Script: merge_rctrunk_to_rcbranch
#
# Purpose:
# Merges the RC trunk into a RC branch
#
# Programmer: Hank Childs
# Creation: June 23, 2007
#
# Modifications:
#
# *****************************************************************************
issueHelp="no"
P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
# Prevent print statements when changing directories
CDPATH=""
BRANCH=""
if [[ $# != 1 ]] ; then
issueHelp="yes"
elif [[ ! -f .branchname ]] ; then
echo ""
echo "ERROR: You must run this script at the top of your branch directory"
echo ""
issueHelp="yes"
elif [[ ! -f .rootpath ]] ; then
echo ""
echo "ERROR: You must run this script at the top of your branch directory"
echo ""
issueHelp="yes"
else
BRANCHNAME=$(cat .branchname)
ROOTPATH=$(cat .rootpath)
BRANCH=${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}${ROOTPATH}
svn ls $BRANCH 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "The RC branch $1 does not appear to exist."
echo "(Looking for it at $BRANCH)"
echo "Try using the script ls_branches to locate your branch."
issueHelp="yes"
fi
TRUNK=${VISIT_SVN_BRANCHES}/$1
svn ls $TRUNK 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "The RC trunk $TRUNK does not appear to exist."
echo "(Looking for it at $BRANCH)"
echo "Try using the script ls_branches to locate the RC trunk."
issueHelp="yes"
fi
fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} RC_NAME"
echo ""
echo "Example: ${0##*/} 1.6.1RC"
echo "\tshould be run at the top level of your checked out RC branch. It will "
echo "\tuse the contents of the file \".branchname\" to determine which branch "
echo "\tto merge the RC trunk into."
echo ""
exit 1
fi
echo ""
echo "Merging the RC trunk into RC branch $BRANCH"
echo ""
echo ""
echo "Getting record of last merge from trunk into branch..."
mkdir tmp_forRev$$
cd tmp_forRev$$
svn checkout --quiet ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}/svninfo
cd svninfo
REV=$(cat Rev_fromRCTrunk)
cd ../..
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
echo ""
svn merge -r ${REV}:HEAD ${VISIT_SVN_BRANCHES}/$1/${ROOTPATH}/$i
cd ..
fi
done
NEW_REV=$(get_latest_rev)
cd tmp_forRev$$/svninfo
echo "$NEW_REV" > Rev_fromRCTrunk
echo ""
echo "Updating branch $BRANCHNAME to contain a record of this merge..."
echo ""
svn commit --quiet -m "Update for revision sent from trunk to $BRANCHNAME, $REV to $NEW_REV"
cd ../..
rm -Rf tmp_forRev$$
echo ""
echo "The changes from the RC trunk have been put on your working copy."
echo "You need to review the changes and do an \"svn commit\" for these changes "
echo "to be saved. Note that the RC branch has been updated with the info that this "
echo "merge took place and future merges from the RC trunk will not attempt to merge "
echo "these revisions again. If you want to back out this merge, you will need "
echo "invoke the following command to update our bookkeeping: "
echo ""
echo " set_trunk_to_branch_revision $BRANCHNAME $REV RC"
echo ""
return 0
#!/bin/ksh
#
# Script: merge_rctrunk_to_trunk
#
# Purpose:
# Merges the RC trunk into the trunk
#
# Programmer: Hank Childs
# Creation: June 23, 2007
#
# *****************************************************************************
issueHelp="no"
P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
# Prevent print statements when changing directories
CDPATH=""
BRANCH=""
RCTRUNKNAME=""
if [[ $# != 1 ]] ; then
issueHelp="yes"
elif [[ "$1" == "-help" || "$1" == "-h" || "$1" == "-?" ]] ; then
issueHelp="yes"
elif [[ ! -f .branchname ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
issueHelp="yes"
elif [[ ! -f .rootpath ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
issueHelp="yes"
else
TRUNKNAME=$(cat .branchname)
if [[ "$TRUNKNAME" != "trunk" ]] ; then
echo "You must be in the trunk when you run this script"
echo ""
issueHelp="yes"
fi
WHOLE_TRUNK="yes"
ROOTPATH=$(cat .rootpath)
if [[ "$ROOTPATH" != "/" ]] ; then
WHOLE_TRUNK="no"
else
if [[ ! -d src || ! -d data || ! -d docs || ! -d test || ! -d third_party || ! -d windowsbuild ]] ; then
WHOLE_TRUNK="no"
fi
fi
if [[ "$WHOLE_TRUNK" == "no" ]]; then
echo "Your checkout is not of the entire trunk. The merge will only "
echo "take place over your checkout. If you continue, any changes that "
echo "are on directories not in your current checkout of the trunk will be lost!"
stop="no"
while [[ "$stop" == "no" ]] ; do
echo "Do you want to continue? [yes/no]"
read answer
if [[ "$answer" == "yes" ]] ; then
stop="yes"
fi
if [[ "$answer" == "no" ]] ; then
stop="yes"
fi
done
if [[ "$answer" == "no" ]] ; then
exit 1
fi
fi
RCTRUNKNAME=$1
BRANCH=${VISIT_SVN_BRANCHES}/${RCTRUNKNAME}${ROOTPATH}
svn ls $BRANCH 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "The RC TRUNK $1 does not appear to exist."
echo "(Looking for it at $BRANCH)"
echo "Try using the script ls_branches to locate the RC trunk."
issueHelp="yes"
fi
fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} <RC trunk>"
echo ""
echo "Example: ${0##*/} 1.6.1RC"
echo "\tshould be run at the top level of your checked out trunk. It will "
echo "\tmerge the work from the RC trunk into the trunk."
echo ""
exit 1
fi
echo ""
echo "Merging $BRANCH into the trunk"
echo ""
echo ""
echo "Getting record of last merge from this branch into the trunk..."
mkdir tmp_forRev$$
cd tmp_forRev$$
svn co ${VISIT_SVN_BRANCHES}/${RCTRUNKNAME}/svninfo
cd svninfo
REV=$(cat Rev_toTrunk)
cd ../..
echo ""
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
echo ""
svn merge -r ${REV}:HEAD ${VISIT_SVN_BRANCHES}/${RCTRUNKNAME}/${ROOTPATH}/$i
cd ..
fi
done
NEW_REV=$(get_latest_rev)
cd tmp_forRev$$/svninfo
echo "$NEW_REV" > Rev_toTrunk
echo ""
echo "Updating branch $RCTRUNKNAME to contain a record of this merge"
echo ""
svn commit -m "Update for revision sent to trunk from RC trunk $RCTRUNKNAME, $REV to $NEW_REV"
cd ../..
rm -Rf tmp_forRev$$
echo ""
echo "The changes from the RC trunk ($RCTRUNKNAME) have been put on your working copy."
echo "You need to review the changes and do an \"svn commit\" for these changes "
echo "to be saved. Note that the branch has been updated with the info that this "
echo "merge took place and future merges into the trunk will not attempt to merge "
echo "these revisions again. If you want to back out this merge, you will need "
echo "invoke the following command to update our bookkeeping: "
echo ""
echo " set_branch_to_trunk_revision $RCTRUNKNAME $REV"
echo " (The RC Trunk is technically a branch, so this is the right script)"
echo ""
return 0
#!/bin/ksh
#
# Script: mk_branch_from_rc
#
# Purpose:
# Copies the RC trunk into the branches directory for a RC development
# branch.
#
# Programmer: Hank Childs
# Creation: June 23, 2007
#
# Modifications:
#
# *****************************************************************************
issueHelp="no"
CDPATH="" # Prevent unneeded echoing of chdir's.
P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
if [[ $# != 2 ]] ; then
issueHelp="yes"
fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: $0 RC_NAME <branch>"
echo ""
echo "Example: $0 1.6.1RC my_dev_work"
echo "\twill create an RC development branch under REPO/branches/${SVN_NERSC_NAME}/my_dev_work"
echo ""
exit 1
fi
SRC=${VISIT_SVN_BRANCHES}/$1
DEST_ROOT=${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}
DEST=${DEST_ROOT}/$2
svn ls $DEST_ROOT 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "Detected that the directory ${DEST_ROOT} does not exist."
echo "(This should only be the case if this is your first time developing "
echo " VisIt in the Subversion repo.)"
echo "Creating directory $DEST_ROOT"
svn mkdir $DEST_ROOT -m "Creating branch area for user ${SVN_NERSC_NAME}"
fi
svn ls $DEST 2>/dev/null > /dev/null
if [[ $? == 0 ]] ; then
echo "The destination branch name ($DEST)"
echo "already exists. Please choose a different name"
exit 1
fi
svn_cp_dir $SRC $DEST
if [[ $? != 0 ]] ; then
echo "There was an error with creating the branch"
exit 1
fi
mkdir tmp_forRev$$
cd tmp_forRev$$
echo ""
echo "Logging revision numbers (needed for merging later)..."
svn co $DEST/svninfo
cd svninfo
REV=$(get_latest_rev)
if [[ -f Rev_fromRCTrunk ]] ; then
echo $REV > Rev_fromRCTrunk
else
echo $REV > Rev_fromRCTrunk
svn add Rev_fromRCTrunk
fi
if [[ -f Rev_toRCTrunk ]] ; then
echo $REV > Rev_toRCTrunk
else
echo $REV > Rev_toRCTrunk
svn add Rev_toRCTrunk
fi
if [[ -f Rev_initial ]] ; then
echo $REV > Rev_initial
else
echo $REV > Rev_initial
svn add Rev_initial
fi
svn commit -m "Add revision info for branch ${1}, which originated at revision $REV"
cd ../../
rm -Rf tmp_forRev$$
echo ""
echo "Successful!"
echo ""
return 0
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Sat Jun 23 16:47:06 PDT 2007
# Get versioning info right when the RC is created.
#
# *****************************************************************************
issueHelp="no"
......@@ -47,11 +50,19 @@ svn_cp_dir $SRC $DEST
# revision history for RC merges.
svn co $DEST/svninfo
cd svninfo
cp Rev_fromTrunk Rev_fromRCTrunk
REV=$(get_latest_rev)
echo $REV > Rev_fromTrunk
svn add Rev_fromRCTrunk
cp Rev_fromTrunk Rev_toRCTrunk
echo $REV > Rev_toRCTrunk
svn add Rev_toRCTrunk
svn delete Rev_fromTrunk
if [[ -f Rev_initial ]] ; then
echo $REV > Rev_initial
else
echo $REV > Rev_initial
svn add Rev_initial
fi
svn commit -m "Add RC revision tracking files"
cd ..
rm -Rf svninfo
......
......@@ -11,6 +11,9 @@
#
# Modifications:
#
# Hank Childs, Sat Jun 23 16:38:02 PDT 2007
# Add support for release candidates.
#
# *****************************************************************************
issueHelp="no"
......@@ -22,6 +25,14 @@ P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
doRC="no"
if [[ $# == 3 ]] ; then
if [[ "$3" == "RC" ]] ; then
doRC="yes"
shift
fi
fi
if [[ $# != 2 ]] ; then
issueHelp="yes"
fi
......@@ -55,7 +66,11 @@ echo ""
echo "Getting appropriate files..."
svn co --quiet $DEST/svninfo
cd svninfo
echo $2 > Rev_toTrunk
if [[ "$doRC" == "yes" ]] ; then
echo $2 > Rev_toRCTrunk
else
echo $2 > Rev_toTrunk
fi
echo ""
echo "Updating with new revision info..."
svn commit --quiet -m "Reset revision from branch $1 to trunk as $2"
......
......@@ -11,6 +11,9 @@
#
# Modifications:
#
# Hank Childs, Sat Jun 23 16:38:02 PDT 2007
# Add support for release candidates.
#
# *****************************************************************************
issueHelp="no"
......@@ -22,6 +25,14 @@ P=$(whence $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
doRC="no"
if [[ $# == 3 ]] ; then
if [[ "$3" == "RC" ]] ; then
doRC="yes"
shift
fi
fi
if [[ $# != 2 ]] ; then
issueHelp="yes"
fi
......@@ -55,7 +66,11 @@ echo ""
echo "Getting appropriate files..."
svn co --quiet $DEST/svninfo
cd svninfo
echo $2 > Rev_fromTrunk
if [[ "$doRC" == "yes" ]] ; then
echo $2 > Rev_fromRCTrunk
else
echo $2 > Rev_fromTrunk
fi
echo ""
echo "Updating with new revision info..."
svn commit --quiet -m "Reset revision from branch $1 to trunk as $2"
......
......@@ -188,6 +188,7 @@ function svn_cp_dir
svn ls $SRC 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "Cannot locate release candidate ($SRC) for copying. Aborting!"
echo "(Try using ls_branches to locate the directory.)"
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment