X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fscripts%2Fland1.sh;h=c3a04684688df3bafd5b1bef2b459a7773dede70;hb=2dc9c16e770415d56839e1996015fec5fab93f29;hp=0c0780339416a5b5f691f914a52d35e52d2cc086;hpb=4ffdc79d3f2369979e0ed86e69e69c388711f3eb;p=fs%2Flustre-release.git diff --git a/lustre/scripts/land1.sh b/lustre/scripts/land1.sh index 0c07803..c3a0468 100755 --- a/lustre/scripts/land1.sh +++ b/lustre/scripts/land1.sh @@ -25,20 +25,24 @@ CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` date=`date +%Y%m%d_%H%M` module=lustre -if [ "$parent" != "HEAD" -a "`cat CVS/Tag`" != "T$parent" ]; then +case $parent in + HEAD) : ;; + b_*|b1*) : ;; + *) parent="b_$parent" ;; +esac +case $child in + HEAD) : ;; + b_*|b1*) : ;; + *) child="b_$child" +esac + +if [ "$parent" != "HEAD" -a "`cat CVS/Tag 2> /dev/null`" != "T$parent" ]; then echo "This script must be run within the $parent branch" exit 1 fi dir=$3 -if [ $parent != "HEAD" ]; then - parent="b_$parent" -fi -if [ $child != "HEAD" ]; then - child="b_$child" -fi - cat << EOF > .mergeinfo parent=$parent PARENT=$PARENT @@ -90,4 +94,3 @@ fi echo "done" echo "Test, commit and then run land2.sh (no arguments)" -