Posted By

hacker on 09/22/09


svn Bash diff grep

Versions (?)

function for grepping a string in every diff between two successional svn revisions of a file

 / Published in: Bash

usage: dgrep foo svn://my-svn-server/trunk/my-file.txt

  1. function dgrep() { export t=head; for r in `svn log $2 | perl -n -e 'print "$1\n" if m/^r(\d*)\s+/'`; do echo "Revision $r:$t"; svn diff -r $r:$t $2 | grep $1; export t=$r; done; }

Report this snippet  

You need to login to post a comment.