Created
January 28, 2014 11:34
-
-
Save lapo-luchini/8666153 to your computer and use it in GitHub Desktop.
A script to grep the whole SVN history of a file.
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
#!/bin/sh | |
FILE="$1" | |
shift | |
PARAM="$@" | |
svn log -q "$FILE" | egrep '^r[0-9]+' | while read REV ALL; do | |
OUT=`svn cat -r $REV "$FILE" | egrep -n "$PARAM"` | |
if [ $? -eq 0 ]; then | |
echo "====> $REV $ALL" | |
echo "$OUT" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment