X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Fland1.sh;h=ef875e64b2a62c94c7582ee0ddb9a48d0c448caa;hb=fe70d8b078742be2826aec12836c3a1114b62c6c;hp=ce152f76bfd069692304bb00c51dd21458f70346;hpb=cbb454150790aceec1153749302cb6e8f4449f1d;p=fs%2Flustre-release.git diff --git a/build/land1.sh b/build/land1.sh index ce152f7..ef875e6 100755 --- a/build/land1.sh +++ b/build/land1.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e progname=${0##*/} @@ -30,7 +30,7 @@ dir=${3:-.} module=$(basename $(<$dir/CVS/Repository)) if [ "$module" = "lustre" ] ; then - echo >&2 "${progname}: You probably want to branch lustre or portals, not the whole tree." + echo >&2 "${progname}: You probably want to land lustre or lnet, not the whole tree." echo >&2 "${progname}: Try using ${0} $parent $child lustre" exit 1 fi @@ -55,7 +55,7 @@ TEST_FILE=${TEST_FILE:-ChangeLog} # does this need to be smarter? check_tag() { [ -z "$1" ] && echo "check_tag() missing arg" && exit3 [ "$1" = "HEAD" ] && return - $CVS log $dir/$TEST_FILE 2> /dev/null | grep -q " $1: " && return + $CVS log ${dir%%/*}/$TEST_FILE 2> /dev/null | grep -q " $1: " && return echo "${progname}: tag $1 not found in $dir/$TEST_FILE" exit 2 } @@ -88,16 +88,16 @@ else fi echo "done" -echo -n "Tagging as ${PARENT}_${CHILD}_LAND_PARENT_$date ..." -$CVS tag ${PARENT}_${CHILD}_LAND_PARENT_$date $dir +echo -n "Create land-to point on $parent as ${PARENT}_${CHILD}_LAND_PARENT_$date ..." +$CVS rtag -r $parent ${PARENT}_${CHILD}_LAND_PARENT_$date $module echo "done" -echo -n "Create land point on ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date ..." -$CVS rtag -r ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date $module $dir +echo -n "Create land-from point on ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date ..." +$CVS rtag -r ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date $module echo "done" -echo -n "Preserve old base tag ${CHILD}_BASE as ${CHILD}_BASE_PREV ..." -$CVS tag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $dir +echo -n "Preserve old base tag on $parent ${CHILD}_BASE as ${CHILD}_BASE_PREV ..." +$CVS rtag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $module echo "done" # Apply all of the changes to your local tree: @@ -106,7 +106,8 @@ $CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date $dir echo "done" echo -n "Recording conflicts in $CONFLICTS ..." -if $CVS update | grep '^C' > $CONFLICTS; then +$CVS update | awk '/^C/ { print $2 }' > $CONFLICTS +if [ -s $CONFLICTS ] ; then echo "Conflicts found, fix before committing." cat $CONFLICTS else