svn blame

The other day I wanted to figure out when a particular line in WordPress was changed. I wanted to know this so I could find the commit message and ticket that went along with it so I could figure out the reasoning behind the change. How do you go about doing that though?

It turns out that svn blame is the command you want. It will output something like this:

$ svn blame http://svn.red-bean.com/repos/test/readme.txt
     3      sally This is a README file.
     5      harry You should read this.

So the first line was last modified by sally in revision 3 and the second line was last modified by harry in revision 5. Awesome huh?

Props to @ArtemR, @westi, and @zamoose for informing my noob ass on how to do this!

2 comments to svn blame

  1. mdawaffe says:

    If your SVN repo has a TRAC instance, there’s a nice interface for svn blame.

    http://core.trac.wordpress.org/browser/trunk/index.php?annotate=blame&rev=7992

    Get to it by clicking “Annotate” in the upper left when viewing a file. Then click on the first column of the output to see a popup with commit info.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you wish to post code, write it like [code]blah[/code] so it will display properly.