Louis W
Louis W

Reputation: 3252

Log of SVN activity for a certain user?

Is it possible to query for all activity relating to a specific user across all repositories. Including any check out action? Thanks.

Upvotes: 8

Views: 8744

Answers (4)

import random
import random

Reputation: 3245

For those arriving here via Google Search and use the --search argument to the svn log command.

Q:\Projects>svn log --search username
------------------------------------------------------------------------
r2874 | username | 2019-03-15 07:37:59 +0000 (Fri, 15 Mar 2019) | 1 line

Test Software
------------------------------------------------------------------------
r2873 | username | 2019-03-15 07:36:15 +0000 (Fri, 15 Mar 2019) | 1 line

Latest Document
------------------------------------------------------------------------

I also like to use the -v argument to see details of the changes

check svn help log for more information

Upvotes: 1

thomas-peter
thomas-peter

Reputation: 7944

Here is a little hack which uses GNU's sed to execute a regular expression against the log output from the svn command. Change username to the user name you require

svn log | sed -n '/| username |/,/-----$/ p'

To get a list of your folders from a webdav config (I was on an Ubuntu box at the time of writing) try something like this....

grep SVNPath /etc/apache2/mods-available/dav_svn.conf | grep -v \# | sed 's/^\s*SVNPath //'

This simply greps once for the line, twice to remove commented lines and filters the SVNPath keyword and associated white-space characters. Your results are repo folders so if you are going to use the svn command, prepend with file://

Upvotes: 9

sbi
sbi

Reputation: 224069

I second Allyn's answer, but have one addition: If you're on Windows, TortoiseSVN allows you to filter the output, including the ability to filter by user name.

Upvotes: 3

Allyn
Allyn

Reputation: 20441

I don't think that svn has built-in support for that feature, but you could write a little script to run

svn log --xml

In the directories of whatever repos you wanted to test, then parse it and pick only the entries done by a given user.

Upvotes: 6

Related Questions