Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Improve SVN logging

svn log - that\\'s something that I\\'m using every day. Before to release the application\\'s code in the production environment I always check the latest commits just to make sure that is safety to proceed. svn log is far from the perfect command for the purpose, but with several tweaks you can get the needed information.

Firstly, get the log information in a xml format:

  svn log -v --xml --with-all-revprops

Display only the latest ten commits (normally I don\\'t need the whole repository history shown):

  svn log -v --xml --with-all-revprops -l 10

Get only the message, the author and the date of the commit:

  svn log -v --xml --with-all-revprops -l 10 | egrep \\"(msg|author|date)\\"

At the end, remove the xml tags from the output:

  svn log -v --xml --with-all-revprops -l 10 | egrep \\"(msg|author|date)\\" | sed -e \\"s/([^<]*)/1/g\\" | sed -e \\"s/([^<]*)/1/g\\" | sed -e \\"s/([^<]*)/-------------------n1/g\\"
If you enjoy this post, share it on Twitter, Facebook or LinkedIn.