Work in progress for marking conflicts with the names of the conflicting patches. Until any patches land in the main darcs repos, they may be edited.
#!/bin/bash
# Number of files to sum up in each iteration
CHUNKSIZE=15
TIXDIR="$1"
SUM="$TIXDIR/sum.tix"
OLDSUM="$TIXDIR/oldsum.tix"
if [ -f $OLDSUM ]
then
echo "Error: There is an oldsum.tix file in $TIXDIR."
exit 1
fi
tixfiles=(`find $TIXDIR -name 'darcs*.tix'`)
filesNo=${#tixfiles[@]}
i=0
while [ $i -lt $filesNo ]; do
if [ -f "$SUM" ]
then
mv "$SUM" "$OLDSUM"
declare -a oldsum=("$OLDSUM")
else
declare -a oldsum=()
fi
chunkfiles=("${tixfiles[@]:$i:$CHUNKSIZE}")
sumfiles=("${oldsum[@]}" "${chunkfiles[@]}")
hpc sum --union "${sumfiles[@]}" --output="$SUM"
i=$[$i+${#chunkfiles[@]}]
echo -n .
done
toremove=("${oldsum[@]}" "${tixfiles[@]}")
rm -f ${toremove[@]}
echo "done"
|