Whamcloud - gitweb
Land b_smallfix onto HEAD (20040512_1806)
[fs/lustre-release.git] / lustre / scripts / land1.sh
index 0c07803..c3a0468 100755 (executable)
@@ -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)"
-