Good way to annotate file under review by script

2 views
Skip to first unread message

ppershing

unread,
Dec 25, 2009, 8:11:17 AM12/25/09
to reviewboard
Hi, I'm searching a solution for this specific problem.
I want to use postreview.py in my svn pre-commit hook to post review
to reviewboard.
After that, I also want to annotate new version of files under review
- reason is, that I'm running coding style lint tool, which reports
violations of our coding style guide. So, after posting review,
I want to add comment to each line of new file identified by utility .
I came accross several problems here with the API.

First is, that this part of api is not well documented :-)

Secondly, the comment line numbers are absolute to "joined" old and
new revision of file, so probably I will need to have some script
which reads diff and manages to convert line numbers, but this seems
to be a little fragile.

The third problem is, that I have no idea how to get "number of file"
from filename.
How can I guess that file name "myfile" corresponds to file number 7
in the following url "reviewboard/api/json/reviewrequests/4/diff/3/
file/7/line/9/comments/"?

Thanks,
Peter

Reply all
Reply to author
Forward
0 new messages