[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Need help: Generate a diff log by author

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 16 Jul 2009 15:50:31 -0400

Ohhh... I love a challenge! Here's a quick little program to find all diffs
between revision 54138 and the head that were done by "bob":

*user="bob"*
*repository="http://subversion/dev"*
*startrev=54186*
*stoprev=HEAD*

*svn log -r$startrev:$stoprev -q "$repository" | sed -n "/^r[^|]*|
$user/s/r\([0-9]*\).*/\1/p" | while read revision*
*do*
* svn -c$revision diff $repository*
*done*

It's a little crude, but the logic is all there. You set "*user*" to the
user you want for that diff. You set *startrev* and *stoprev* for the
revisions you want to examine.

The loop runs *svn log* in quiet mode. That is, it only prints the revision
ID, user ID, and date of the revision. I use *sed* select the revisions for
that particular user, and separate out the Subversion revision IDs.

Once I have the revision IDs, I feed them via a *while* loop into the *svn
diff* command. The *-c* option shows the change in that revision.

This could easily be expanded into a full blown shell script that calculates
out where to start and stop the log, does this for each user, and then mails
them the results.

On Wed, Jul 15, 2009 at 3:30 PM, Steven Jackson <sjackson_at_mediapathic.org>wrote:

> I don't know if this is even possible, and if it is, how easy it is to
> pull off.
>
> [Background]
> Each week we release our code to our live server via a vendor branch
> that is created each week as a copy of trunk. I perform a svn diff
> between the previous release and the new release, and capture the output
> to send in an email to all our developers so that they can review all
> the changes and make sure that everything going live is supposed to.
>
> The resulting list is long and contains all diff info from all
> developers. If I could send an email containing only the diffs generated
> by each author to that author, then reviewing this list would be more
> manageable.
>
> [What I would like to do]
> Is it possible to generate a diff list per author (developer)? So, I can
> generate a svn diff, but the resulting output only contains commit info
> from a specific author?
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2371569
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe_at_subversion.tigris.org].
>

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2371866
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-16 21:52:18 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.