Posted By

hacker on 09/22/09


svn Bash grep

Versions (?)

function for grepping a string in every svn revision of a file

 / Published in: Bash

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

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

Report this snippet  

You need to login to post a comment.