Whamcloud - gitweb
Land b1_2 onto HEAD (20040304_171022)
[fs/lustre-release.git] / lustre / scripts / land1.sh
index 0c07803..16f6b20 100755 (executable)
@@ -25,6 +25,17 @@ CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
 date=`date +%Y%m%d_%H%M`
 module=lustre
 
 date=`date +%Y%m%d_%H%M`
 module=lustre
 
+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`" != "T$parent" ]; then
         echo "This script must be run within the $parent branch"
        exit 1
 if [ "$parent" != "HEAD" -a "`cat CVS/Tag`" != "T$parent" ]; then
         echo "This script must be run within the $parent branch"
        exit 1
@@ -32,13 +43,6 @@ fi
 
 dir=$3
 
 
 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
 cat << EOF > .mergeinfo
 parent=$parent
 PARENT=$PARENT
@@ -90,4 +94,3 @@ fi
 echo "done"
 
 echo "Test, commit and then run land2.sh (no arguments)"
 echo "done"
 
 echo "Test, commit and then run land2.sh (no arguments)"
-