Created
January 21, 2010 05:20
-
-
Save andynu/282602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zsh function | |
svnhistgrep () { | |
term=$1 | |
file=$2 | |
versions=($(svn log $file | perl -ne 'print "$1 " if (/r(\d+)/)')) | |
for r in $versions | |
do | |
echo "$file r$r" | |
svn cat -r$r $file | egrep -C 3 -n $term | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment