Thursday, July 1, 2010

Find my commits SVN script

This script finds all log messages for commits that you've done in (or below) the current SVN-controlled directory.

# Find all my commits _ever_ in this level of the repository (and below).

repo_url=`svn info | sed -n 's/^URL: *//p'`
# Multiple usernames can be given, separated by \|

for revision in `svn log -q $repo_url | sed -n "s/r\([0-9]*\) | \($username\) |.*/\1/p"`
svn log -vr $revision $repo_url


Harold L. said...

Thanks for working out the sed code for that!

naton said...

Excuse a newbie question, but how would this be if I wanted to do a "show all my commits for today"? BTW, can I run this in the /Sites/ folder, where I keep all my projects?

Kees Hink said...

naton, maybe this helps:

naton said...

Kees: Super. Thanks!

(heh, that was a really belated reply! :)