SVN Export All Files Changed Between 2 Revisions


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.