Commit 2f9ffe53 authored by hrchilds's avatar hrchilds

Modify merge scripts to have more stable behavior.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@2695 18c085ea-50e0-402c-830e-de6fd14e8384
parent 8ad23e9c
......@@ -16,9 +16,13 @@
# Hank Childs, Thu Jul 5 16:13:57 PDT 2007
# Suppress SVN noise.
#
# Hank Childs, Mon Dec 17 15:44:53 PST 2007
# Make sure that the trunk is up-to-date and has no checkouts.
#
# *****************************************************************************
issueHelp="no"
allowCheckouts="no"
P=$(whence $0)
P2=${P%/*}
......@@ -29,25 +33,42 @@ 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 ""
if [[ $# == 2 ]] ; then
if [[ "$2" != "-allow_checkouts" ]] ; then
issueHelp="yes"
else
allowCheckouts="yes"
fi
elif [[ $# != 1 ]] ; then
issueHelp="yes"
elif [[ ! -f .rootpath ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
fi
if [[ "$1" == "-help" || "$1" == "-h" || "$1" == "-?" ]] ; then
issueHelp="yes"
else
fi
if [[ "$issueHelp" != "yes" ]] ; then
if [[ ! -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"
fi
fi
if [[ "$issueHelp" != "yes" ]] ; then
TRUNKNAME=$(cat .branchname)
if [[ "$TRUNKNAME" != "trunk" ]] ; then
echo "You must be in the trunk when you run this script"
echo ""
issueHelp="yes"
fi
fi
if [[ "$issueHelp" != "yes" ]] ; then
WHOLE_TRUNK="yes"
ROOTPATH=$(cat .rootpath)
if [[ "$ROOTPATH" != "/" ]] ; then
......@@ -90,16 +111,37 @@ fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} <branch>"
echo "Usage: ${0##*/} <branch> [-allow_checkouts]"
echo ""
echo "Args:" echo "\t-allow_checkouts\tForce merge, despite checkouts in the working copy of the trunk."
echo ""
echo "Example: ${0##*/} my_dev_work"
echo "\tshould be run at the top level of your checked out trunk. It will "
echo "\tmerge the work from my_dev_work into the trunk."
echo "\tThis command should be run at the top level of your checked out "
echo "\ttrunk. It will merge the work from my_dev_work into the trunk."
echo ""
exit 1
fi
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
if [[ "$allowCheckouts" == "no" ]] ; then
echo "Checking for pre-existing checkouts on ${i}..."
files=$(svn status -q)
if [[ "$files" != "" ]] ; then
echo "I believe you have the following files checked out on ${i}:"
echo "$files"
echo "Aborting!"
exit 1
fi
fi
echo "Making sure your working copy of the trunk/$i is up to date"
svn update
cd ..
fi
done
echo ""
echo "Merging $BRANCH into the trunk"
echo ""
......@@ -132,8 +174,8 @@ echo ""
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
......
......@@ -13,9 +13,13 @@
# Hank Childs, Thu Jul 5 13:58:42 PDT 2007
# Make a checkout a little less verbose.
#
# Hank Childs, Mon Dec 17 15:44:53 PST 2007
# Make sure that the RC trunk is up-to-date and has no checkouts.
#
# *****************************************************************************
issueHelp="no"
allowCheckouts="no"
P=$(whence $0)
P2=${P%/*}
......@@ -26,19 +30,33 @@ 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 ""
if [[ $# == 2 ]] ; then
if [[ "$2" != "-allow_checkouts" ]] ; then
issueHelp="yes"
else
allowCheckouts="yes"
fi
elif [[ $# != 1 ]] ; then
issueHelp="yes"
elif [[ ! -f .rootpath ]] ; then
echo "ERROR: You must run this script at the top of your checkout directory"
echo ""
fi
if [[ "$1" == "-help" || "$1" == "-h" || "$1" == "-?" ]] ; then
issueHelp="yes"
else
fi
if [[ "$issueHelp" != "yes" ]] ; then
if [[ ! -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"
fi
fi
if [[ "$issueHelp" != "yes" ]] ; then
T2=$(cat .branchname)
TRUNKNAME=${T2#*RC_} # strip off 1.6.1RC_trunk to make trunk
if [[ "$TRUNKNAME" != "trunk" ]] ; then
......@@ -46,6 +64,10 @@ else
echo ""
issueHelp="yes"
fi
fi
if [[ "$issueHelp" != "yes" ]] ; then
WHOLE_TRUNK="yes"
ROOTPATH=$(cat .rootpath)
if [[ "$ROOTPATH" != "/" ]] ; then
......@@ -88,16 +110,37 @@ fi
if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} <branch>"
echo "Usage: ${0##*/} <branch> [-allow_checkouts]"
echo ""
echo "Args:" echo "\t-allow_checkouts\tForce merge, despite checkouts in the working copy of the trunk."
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 "\tThis command should be run at the top level of your checked out RC"
echo "trunk. It will merge the work from my_rc_dev_work into the RC trunk."
echo ""
exit 1
fi
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
if [[ "$allowCheckouts" == "no" ]] ; then
echo "Checking for pre-existing checkouts on ${i}..."
files=$(svn status -q)
if [[ "$files" != "" ]] ; then
echo "I believe you have the following files checked out on ${i}:"
echo "$files"
echo "Aborting!"
exit 1
fi
fi
echo "Making sure your working copy of the trunk/$i is up to date"
svn update
cd ..
fi
done
echo ""
echo "Merging $BRANCH into the trunk"
echo ""
......@@ -124,9 +167,8 @@ fi
echo ""
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
......
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Mon Dec 17 16:12:45 PST 2007
# Explicitly enumerate the list of directories to merge over.
#
# *****************************************************************************
issueHelp="no"
......@@ -60,8 +63,8 @@ if [[ "$issueHelp" == "yes" ]] ; then
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 "\tThis command should be run at the top level of your checked out RC branch."
echo "\tIt will use the contents of the file \".branchname\" to determine which branch "
echo "\tto merge the RC trunk into."
echo ""
......@@ -85,8 +88,8 @@ cd ../..
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
......
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Mon Dec 17 16:12:45 PST 2007
# Explicitly enumerate the list of directories to merge over.
#
# *****************************************************************************
issueHelp="no"
......@@ -52,8 +55,9 @@ if [[ "$issueHelp" == "yes" ]] ; then
echo "Usage: ${0##*/}"
echo ""
echo "Example: ${0##*/}"
echo "\tshould be run at the top level of your checked out branch. It will "
echo "\tuse the contents of the file \".branchname\" to determine which branch "
echo ""
echo "\tThis command should be run at the top level of your checked out branch."
echo "\tIt will use the contents of the file \".branchname\" to determine which branch "
echo "\tto merge the trunk into."
echo ""
......@@ -77,8 +81,8 @@ cd ../..
echo "The revision of the last merge was $REV"
echo ""
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
for i in src data docs test third_party windowsbuild ; do
if [[ -d $i ]] ; then
cd $i
echo ""
echo "Merging directory \"$i\""
......
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