Get files changed between 2 revisions in SVN


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

This script get (in the correct tree folder structure) all files changed between 2 revisions.
NOTICE: This scripts does not advice about files deleted


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. # usage: ./diffpackage.sh <init_version> <final_version>
  3. # example: ./diffpackage.sh 303 315
  4.  
  5. repo_url=https://127.0.0.1/usvn/svn/MyProyect/trunk
  6.  
  7. # Export diff files
  8. for i in $(svn diff --summarize -r $1:$2 $repo_url | awk '{ print $2 }');
  9. do
  10. p=diff_$1_$2/$(echo $i | sed -e "s{$repo_url/{{");
  11. mkdir -p $(dirname $p);
  12. svn export $i $p;
  13. done

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.