This post is related to another titled "Problems using API to load diff" on 12/16/2009. As in that post, I'm trying to create an automated post-commit review monitor. In this post I document the approach of using post-review to generate my reviews. I'm using ReviewBoard 1.0.4 with Subversion.
I'm shelling out to call post-review from a c++ program on an Ubuntu system. However, entering the post-review command by hand looks like this: post-review --repository-url=svn://svnserver/TDL/Projectspost-review -- repository-url=svn://svnserver/TDL/Projects --revision-range=9352 -d - p /trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp >>> svn info svn://svnserver/TDL/Projects >>> repository info: Path: svn://svnserver/TDL/Projects, Base path: /, Supports >>> changesets: False >>> changing repository info base_path from / to >>> /trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp >>> svn diff --diff-cmd=diff >>> svn://svnserver/TDL/Projects/trunk/TDL/Application/bin/TwnFwEoffload/src/twnfweoffload....@9352 >>> >>> svn://svnserver/TDL/Projects/trunk/TDL/Application/bin/TwnFwEoffload/src/twnfweoffload....@head >>> Looking for 'localhost /' cookie in >>> /home/reviewboard/.post-review-cookies.txt >>> Cookie file loaded, but no cookie for this server ==> Review Board Login Required Enter username and password for Review Board at http://localhost/ Username: jim0001 Password: >>> Logging in with username "jim0001" >>> HTTP POSTing to http://localhost/api/json/accounts/login/: {'username': >>> 'jim0001', 'password': '**************'} >>> Logged in. >>> Attempting to create review request for None >>> HTTP GETting /api/json/repositories/ >>> HTTP GETting /api/json/repositories/1/info/ >>> repository info: Path: svn://svnserver/TDL/Projects, Base path: >>> /trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp, Supports >>> changesets: False >>> HTTP POSTing to http://localhost/api/json/reviewrequests/new/: >>> {'repository_path': u'svn://svnserver/TDL/Projects'} >>> Review request created >>> Uploading diff, size: 49775 >>> HTTP POSTing to http://localhost/api/json/reviewrequests/213/diff/new/: >>> {'basedir': >>> '/trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp'} Error uploading diff: One or more fields had errors (105) >>> {u'fields': {u'path': [u"Failure opening >>> '/trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp/TwnFwEoffload.cpp'\n'/trunk/TDL/Application/bin/TwnFwEoffload/src/TwnFwEoffload.cpp' >>> is not a directory in filesystem 'D:/SVN/Repositories/TDL/Projects/db'"]}, >>> u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', >>> u'code': 105}} Your review request still exists, but the diff is not attached. Looks like post-review is trying to open the diff file from /trunk which is not a good file system path. From my understanding the diff file should be coming from SVN into a temporary file. Is there a fix for this or am I setting up the parameters wrong? Jim -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
