#!/bin/sh # Get all revisions of a given file FOO. # Save each revision to a file named rREVNUM-FOO. # Only works for SVN right now, but could work with git / hg too. F="${1}" if [ -z "${F}" ]; then echo "ERROR: file path argument required" >&2 exit 1 fi for rev in `svn log -q ${F} | cut -d " " -f 1 | grep -E "^r[0-9]"`; do svn cat -r${rev} ${F} > ${rev}-${F} done