X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=build%2Freplace1.sh;h=51570f507ad9161a02b85bca3af78e35ec9dd3c1;hb=4a51b7a884e536da4e6a3386e8d25a2bd2b445a2;hp=8a571378e3a22e80ff9004d0269a17d21f3aa07c;hpb=67c0d9576131651bb696c1917ed37508c7d22d31;p=fs%2Flustre-release.git diff --git a/build/replace1.sh b/build/replace1.sh index 8a57137..51570f5 100755 --- a/build/replace1.sh +++ b/build/replace1.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e progname=${0##*/} @@ -16,7 +16,7 @@ if [ -f $CONFLICTS ] ; then fi if [ $# -lt 2 -o $# -gt 3 ]; then - echo "This is phase 1 of replacing branches. Usage: $0 parent(old) child(new) [dir]" + echo "This is phase 1 of replacing branches. Run this in the PARENT tree. Usage: $0 parent(will be replaced) child(will become the new parent) [dir]" exit fi @@ -89,33 +89,35 @@ fi echo "done" # Tag parent before merge -echo -n "Tagging as ${PARENT}_${CHILD}_REPLACE_PARENT_$date ..." -$CVS tag ${PARENT}_${CHILD}_REPLACE_PARENT_$date $dir +echo -n "Create land-to point on $parent as ${PARENT}_${CHILD}_REPLACE_PARENT_$date ..." +$CVS rtag -r $parent ${PARENT}_${CHILD}_REPLACE_PARENT_$date $module echo "done" # Tag child before merge -echo -n "Create land point on ${child} ${PARENT}_${CHILD}_REPLACE_CHILD_$date ..." -$CVS tag -r ${child} ${PARENT}_${CHILD}_REPLACE_CHILD_$date $dir +echo -n "Create land-from point on ${child} ${PARENT}_${CHILD}_REPLACE_CHILD_$date ..." +$CVS rtag -r ${child} ${PARENT}_${CHILD}_REPLACE_CHILD_$date $module echo "done" # In case someone tries to re-land later -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: echo -n "Updating as -j $parent -j $child ..." -$CVS update -j $parent -j $child $dir +$CVS update -j $parent -j $child -dP $dir echo "done" echo -n "Recording conflicts in $CONFLICTS ..." -$CVS update | awk '/^C/ { print $2 }' > $CONFLICTS +$CVS update $dir | awk '/^C/ { print $2 }' > $CONFLICTS if [ -s $CONFLICTS ] ; then echo "Conflicts found, fix before committing." cat $CONFLICTS fi +echo "done" -$CVS diff --brief -r $CHILD $dir >> $CONFLICTS +echo -n "Verifying that there are no diffs from $child ..." +$CVS diff --brief -r $child $dir >> $CONFLICTS if [ -s $CONFLICTS ] ; then echo "Danger! The child branch $CHILD differs from the updated branch $dir" cat $CONFLICTS @@ -123,7 +125,6 @@ else echo "No conflicts found" rm -f $CONFLICTS fi - echo "done" echo "Build, test, commit and then run replace2.sh (no arguments)"