Commit d6637779 authored by hrchilds's avatar hrchilds

Improve determination of revision when doing merges.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@982 18c085ea-50e0-402c-830e-de6fd14e8384
parent 8a3ef32f
......@@ -117,11 +117,10 @@ for i in * ; do
echo "Merging directory \"$i\""
echo ""
svn merge -r ${REV}:HEAD ${VISIT_SVN_BRANCHES}/${SVN_NERSC_NAME}/${BRANCHNAME}/${ROOTPATH}/$i
NEW_REV_WITH_M=$(svnversion .)
NEW_REV=${NEW_REV_WITH_M%M}
cd ..
fi
done
NEW_REV=$(get_latest_rev)
cd tmp_forRev$$/svninfo
echo "$NEW_REV" > Rev_toTrunk
......
......@@ -77,7 +77,6 @@ cd ../..
echo "The revision of the last merge was $REV"
echo ""
NEW_REV_WITH_M="$REV"
for i in * ; do
if [[ -d $i && "$i" != "tmp_forRev$$" ]] ; then
cd $i
......@@ -85,11 +84,10 @@ for i in * ; do
echo "Merging directory \"$i\""
echo ""
svn merge -r ${REV}:HEAD ${VISIT_SVN_TRUNK}/${ROOTPATH}/$i
NEW_REV_WITH_M=$(svnversion .)
cd ..
fi
done
NEW_REV=${NEW_REV_WITH_M%M}
NEW_REV=$(get_latest_rev)
cd tmp_forRev$$/svninfo
echo "$NEW_REV" > Rev_fromTrunk
......
......@@ -65,7 +65,7 @@ echo ""
echo "Logging revision numbers (needed for merging later)..."
svn co $DEST/svninfo
cd svninfo
REV=$(svnversion .)
REV=$(get_latest_rev)
if [[ -f Rev_fromTrunk ]] ; then
echo $REV > Rev_fromTrunk
else
......
......@@ -53,12 +53,12 @@ mkdir tmp_forRev$$
cd tmp_forRev$$
echo ""
echo "Getting appropriate files..."
svn co $DEST/svninfo
svn co --quiet $DEST/svninfo
cd svninfo
echo $2 > Rev_toTrunk
echo ""
echo "Updating with new revision info..."
svn commit -m "Reset revision from branch $1 to trunk as $2"
svn commit --quiet -m "Reset revision from branch $1 to trunk as $2"
cd ../../
rm -Rf tmp_forRev$$
......
......@@ -53,12 +53,12 @@ mkdir tmp_forRev$$
cd tmp_forRev$$
echo ""
echo "Getting appropriate files..."
svn co $DEST/svninfo
svn co --quiet $DEST/svninfo
cd svninfo
echo $2 > Rev_fromTrunk
echo ""
echo "Updating with new revision info..."
svn commit -m "Reset revision from branch $1 to trunk as $2"
svn commit --quiet -m "Reset revision from branch $1 to trunk as $2"
cd ../../
rm -Rf tmp_forRev$$
......
......@@ -30,6 +30,22 @@ VISIT_SVN_TAGS=${VISIT_SVN_REPO}/tags
##
##
function get_latest_rev
{
# This assumes a certain format for SVN log. It gets the second line,
# which has "r<REV> | ...", and then strips off the "| ...", and then
# strips off the 'r'.
REV=$(svn log $VISIT_SVN_REPO --revision HEAD | head -2 | tail -1 | cut -d'|' -f1 | sed 's/r//g')
if (( REV < 950 )) ; then
echo "An error occurred in getting revision!!" >&2
echo "Pursue this problem with a VisIt-SVN guru" >&2
echo "1000000"
else
echo $REV
fi
}
# Note that the is_version_string test would fail for numbers bigger than 9,
# such as 1.6.10. If this ever comes up, it should be easy to fix.
function is_version_string
......
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