Posted By

tcmacdonald on 02/01/10


Tagged

svn Bash script svn-export


Versions (?)

SVN Export All Files Changed Between 2 Revisions


 / Published in: Bash
 

Usage: ./svn-export.sh [repository/subdir] [rev1] [rev2]

  1. #!/bin/bash
  2. if test ! $1; then
  3. echo "Missing required arguments: repo path, rev1, rev2"
  4. exit 0
  5. fi
  6.  
  7. DOMAIN='http://your.svnrepository.com'
  8. REPO=$1
  9. REV1=$2
  10. REV2=$3
  11. for i in $(svn diff --summarize -r $REV1:$REV2 $DOMAIN$REPO | awk '{ print $2 }');
  12. do p=$(echo $i | sed -e "s{$DOMAIN$REPO/{{");
  13. mkdir -p $(dirname $p);
  14. svn export $i $p;
  15. done

Report this snippet  

You need to login to post a comment.