#!/bin/sh # tla-lineage-replay # Scott Bronson # 8 Jan 2004 # Applies the changesets supplied on the command line in order. # $ tla-lineage-replay base patch-0 patch-1 patch-2 # $ tla-lineage-replay 000 001 002 003 # if tla-lineage generated the changesets # see the tla-lineage comments for a usage example. # Remember that you cannot change history! base=$1 shift for set in $*; do # if base == set then it means we want to restore base0's original # log message so there's no changeset to apply. if [ "$base" != "$set" ]; then tla apply-changeset $set $base fi cd $base # Most of this script is devoted to munging the log message mv {arch}/tla-bash-complete/tla-bash-complete--sb/tla-bash-complete--sb--1.0/address@hidden/patch-log/patch-* tmp-msg log=`tla make-log` grep Summary: tmp-msg > $log grep Keywords: tmp-msg >> $log echo >> $log # Find the checkin comment state=0 cat tmp-msg | while read var; do if [ $state = 1 ]; then echo $var >> $log; fi if [ "x$var" = "x" ]; then state=1; fi done echo >> $log echo "---------------- tla-lineage-replay ----------------" >> $log # Find the orignal log headers cat tmp-msg | while read var; do if [ "x$var" = "x" ]; then state=1; fi if [ $state = 0 ]; then echo Original-$var >> $log; fi done rm tmp-msg tla commit cd .. done