#!/bin/bash
# Generate a number of empty revisions, for incorporation into an SVN dump file
# 2011 Tim Jackson <tim@timj.co.uk>

if [ -z "$1" ]; then
	echo "Usage: svn-generate-empty-revisions.sh NUMREVISIONS [TIMESTAMP]"
	exit 1
fi

timestamp=$(date +%Y-%m-%dT%H:%M:%S.000000Z)
if [ ! -z "$2" ]; then
	timestamp=$2
fi

for i in $(seq 1 $1); do
cat <<EOF
Revision-number: $i
Prop-content-length: 112
Content-length: 112

K 7
svn:log
V 38
This is an empty revision for padding.
K 8
svn:date
V 27
$timestamp
PROPS-END

EOF
done
