Return to Snippet

Revision: 23181
at February 1, 2010 09:43 by tcmacdonald


Initial Code
#!/bin/bash
if test ! $1; then
    echo "Missing required arguments: repo path, rev1, rev2"
    exit 0
fi

DOMAIN='http://your.svnrepository.com'
REPO=$1
REV1=$2
REV2=$3
for i in $(svn diff --summarize -r $REV1:$REV2 $DOMAIN$REPO | awk '{ print $2 }'); 
    do p=$(echo $i | sed -e "s{$DOMAIN$REPO/{{"); 
    mkdir -p $(dirname $p); 
    svn export $i $p; 
done

Initial URL

                                

Initial Description
> <code>__Usage:__<br>  
> ./svn-export.sh [repository/subdir] [rev1] [rev2]</code>

Initial Title
SVN Export All Files Changed Between 2 Revisions

Initial Tags
svn, Bash, script

Initial Language
Bash