RSS Feed

SVN: View logs

While you’re at the terminal you may as well take advantage of subversions log command to view logs/history without having to open your browser.

svn log

This command lists recent commits, the revision number, the user, date and time as well as the comment:

————————————————————————
r5 | user1 | 2010-08-31 15:58:56 +0100 (Tue, 31 Aug 2010) | 1 line

————————————————————————
r4 | user2 | 2010-08-31 15:23:44 +0100 (Tue, 31 Aug 2010) | 1 line

Initial Import
————————————————————————
r3 | user1 | 2010-08-31 15:21:48 +0100 (Tue, 31 Aug 2010) | 1 line

Initial setup
————————————————————————

Note: Before running `svn log` remember to `svn update` otherwise commit logs will not be updated.

To return the files that have been committed per log, use –verbose or -v

svn log -v

————————————————————————
r29 | user3 | 2010-09-29 16:50:44 +0100 (Wed, 29 Sep 2010) | 1 line

Changed paths:
M /trunk/filename.php

Example commit
————————————————————————

You can return a specific revision commit log by providing the revision number after the -r parameter:

svn log -v -r29

svn log is an extremely useful but often forgot about command when dealing with subversion.

Posted in Linux on the 4th October 2010

2 people have spoken their minds!

  1. Colin says:

    Hi,

    I’d just like to say thank you because the following note in your article is an extremely important piece of information;

    “Note: Before running `svn log` remember to `svn update` otherwise commit logs will not be updated.:”

    I ended up here because I was having exactly the problem that this cures. I couldn’t remember the name of a file I’d just updated and so typed “svn log” but I only saw logs for older revisions.

    I hadn’t seen this comment in the red book when I read it (years ago, admittedly) and I don’t see any reference to it in “svn help log”, so thank you very much for providing me with an answer to the problem of why “svn log” doesn’t show recent logs.

    Regards,
    Colin.

SPEAK YOUR MIND...

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

*