tags:

views:

170

answers:

3

I am using PySVN and the work-bench for my svn needs and I previously used to use subclipse. When I update my working copy, neither of these tools told me the reason why someone has committed the last commit.

I want it to show along with the new revision number, the comment given for the last commit and by whom. I am quite good with python myself, I tried to find help on this in the pysvn documentation, but nothing. (Or does pysvn already have this feature ??)

I couldn't find the comment for committing a particular line even in the annotate view.. am I interpreting this 'comment' wrongly.. is it supposed to be hidden :?

If anyone could point me to the right direction...

+1  A: 

I don't know about PySVN but from command line you can use, I suppose:

svn log -v

to get last commit comment full informations. Surely PySVN has the possibility to do that.

Looking to the doc of PySVN I found this example about pysvn.Client.callback_get_log_message

import pysvn

log_message = "reason for change"
def get_log_message():
    return rc, log_message

client = pysvn.Client()
client.callback_get_log_message = get_log_message

"...The callback_get_log_message is called when a log message is required to complete the current command. Return the True in rc and a log message as a string. Returning False in rc will cause the command to be cancelled. An empty log_message is not allowed and may cause the command to be cancelled. Unicode strings cannot be handled. If you have a unicode string, convert it to UTF-8..."

DrFalk3n
Thanks, I'll check the pysvn documentation right now! :)
Shrikant Sharat
Thanks so much, but isn't that to be used when I am giving a comment.. I think this http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client_log is more appropriate to GET the last/previous log message(s)
Shrikant Sharat
Yeah, pysvn.Client.log is wrapping "svn log" command. As already said I don't know about PySVN, just surfing on google :-) !
DrFalk3n
+2  A: 

a quick script

#!/bin/bash
svn up
svn log --limit=1
rgiar
sweet! I remember I used to write these sweet little scripts when I was using linux :)
Shrikant Sharat
+1  A: 

You can get the log info from pretty much any Subversion client tool Keep in mind the last commit log message may not tell you anything useful - there may have been 50 commits since you last updated, so you really need to see all log messages since you last committed.

Additionally, you may want to make use of the pre-commit hook to enforce entering a message on commit. That way you'll always have something to read :)

RedFilter
wow, we are just a team of 3+1 tester, so there wont be so many commits at once :P and, we all write comments.. :)
Shrikant Sharat