Commit 47fe06eb authored by hrchilds's avatar hrchilds

(1) I modified the co_branch script so that you can checkout a branch from a

different user. 
(2) I ported ls_branches and ls_tags from ksh to sh.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@3296 18c085ea-50e0-402c-830e-de6fd14e8384
parent dc148b7f
......@@ -16,6 +16,9 @@
# Hank Childs, Fri Feb 22 10:27:16 PST 2008
# Ported from ksh to bash.
#
# Hank Childs, Fri Feb 22 10:52:45 PST 2008
# Add "-user" flag, so multiple developers can share a branch.
#
# *****************************************************************************
issueHelp="no"
......@@ -25,7 +28,16 @@ P=$(which $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
if [[ $# != 2 ]] ; then
user=$SVN_NERSC_NAME
echo "Num args is $#"
if [[ $# == 4 ]] ; then
if [[ "$3" == "-user" ]] ; then
echo "Got user $4"
user=$4
else
issueHelp="yes"
fi
elif [[ $# != 2 ]] ; then
issueHelp="yes"
fi
......@@ -33,6 +45,9 @@ if [[ "$issueHelp" == "yes" ]] ; then
echo ""
echo "Usage: ${0##*/} <branch> <dir>"
echo "Usage: ${0##*/} <branch> <known-dir-combo>"
echo "Optional argument: -user <username>"
echo " (Allows you to check out another developers branch)"
echo " (Make sure to specify that developers NERSC username)"
echo ""
echo "Example: ${0##*/} my_dev_work /src"
echo "\twill check out the /src directory of the branch my_dev_work "
......@@ -62,7 +77,7 @@ fi
function checkout_dir
{
BRANCH=${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${1}/${2#/}
BRANCH=${VISIT_SVN_BRANCHES}/${3}/${1}/${2#/}
svn ls $BRANCH 2>/dev/null > /dev/null
if [[ $? != 0 ]] ; then
echo "The branch $1 does not appear to exist."
......@@ -128,7 +143,7 @@ function checkout_dir
mkdir tmp_forRev$$
cd tmp_forRev$$
svn checkout --quiet ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${1}/svninfo > /dev/null
svn checkout --quiet ${VISIT_SVN_BRANCHES}/${3}/${1}/svninfo > /dev/null
cd svninfo
init="notFound"
if [[ ! -f Rev_initial ]] ; then
......@@ -214,26 +229,26 @@ function checkout_dir
if [[ "$2" == "sdt" ]] ; then
echo "Checking out /src"
checkout_dir $1 "/src"
echo "Checking out /data"
checkout_dir $1 "/data"
checkout_dir $1 "/src" $user
echo "Checking out /data"
checkout_dir $1 "/data" $user
echo "Checking out /test"
checkout_dir $1 "/test"
checkout_dir $1 "/test" $user
elif [[ "$2" == "all" ]] ; then
echo "Checking out /src"
checkout_dir $1 "/src"
checkout_dir $1 "/src" $user
echo "Checking out /data"
checkout_dir $1 "/data"
checkout_dir $1 "/data" $user
echo "Checking out /test"
checkout_dir $1 "/test"
checkout_dir $1 "/test" $user
echo "Checking out /docs"
checkout_dir $1 "/docs"
checkout_dir $1 "/docs" $user
echo "Checking out /third_party"
checkout_dir $1 "/third_party"
checkout_dir $1 "/third_party" $user
echo "Checking out /windowsbuild"
checkout_dir $1 "/windowsbuild"
checkout_dir $1 "/windowsbuild" $user
else
checkout_dir $1 "$2"
checkout_dir $1 "$2" $user
fi
echo ""
......
#!/bin/ksh
#!/bin/sh
#
# Script: ls_branches
#
......@@ -10,6 +10,9 @@
#
# Modifications:
#
# Hank Childs, Fri Feb 22 10:57:49 PST 2008
# Port from ksh to sh.
#
# *****************************************************************************
if [[ $# != 0 ]] ; then
......@@ -22,7 +25,7 @@ if [[ $# != 0 ]] ; then
fi
fi
P=$(whence $0)
P=$(which $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
......
#!/bin/ksh
#!/bin/sh
#
# Script: ls_tags
#
......@@ -8,13 +8,18 @@
# Programmer: Hank Childs
# Creation: January 9, 2008
#
# Modifications:
#
# Hank Childs, Fri Feb 22 11:08:20 PST 2008
# Ported from ksh to sh.
#
# *****************************************************************************
P=$(whence $0)
P=$(which $0)
P2=${P%/*}
. ${P2}/visit_svn_helper
svn ls ${VISIT_SVN_TAGS}
return 0
exit 0
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