Posted By

isholgueras on 12/30/11


Tagged

svn Bash revisions


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

campezzi


Get files changed between 2 revisions in SVN


 / Published in: Bash
 

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

  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  

You need to login to post a comment.