I followed these instructions, and it appears to do what is intended.
It will create a post-review exe that will run on this machine (the
machine I used py2exe on), and will even work on other machines to
some extent. You can view the help, and post reviews as long as you
don't supply any information to the review. If you attempt to use --
summary, --description --branch, etc, it will fail when trying to save
the review.


WITHOUT --SUMMARY:

C:\Documents and Settings\user\Desktop\post-review dist>post-
review.exe --server="http://site.com:80"; --username="review_poster" --
password="password" --submit-as="rrivard" --repository-url="http://svn-
server.com/repos/MMSDevelopment" --revision-range="HEAD:HEAD" -d
>>> svn info http://svn-server.com/repos/MMSDevelopment
>>> repository info: Path: http://svn-server.com/repos/MMSDevelopment,
Base path: /, Supports changesets: False
>>> svn diff --diff-cmd=diff http://svn-server.com/repos/MMSDevelopment
/@HEAD http://svn-server.com/repos/MMSDevelopment/@HEAD
>>> Looking for 'site.com /' cookie in C:\Documents and Settin
gs\seagleMA\Local Settings\Application Data\.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request for None
>>> HTTP GETting /api/json/repositories/
>>> HTTP GETting /api/json/repositories/1/info/
>>> repository info: Path: http://svn-server.com/repos/MMSDevelopment,
Base path: /, Supports changesets: False
>>> Submitting the review request as rrivard
>>> HTTP POSTing to http://site.com:80/api/json/reviewrequests
/new/: {'repository_path': u'http://svn-server.com/repos/
MMSDevelopment
', 'submit_as': 'rrivard'}
>>> Review request created
>>> Uploading diff, size: 0
>>> HTTP POSTing to http://site.com:80/api/json/reviewrequests
/52/diff/new/: {'basedir': '/'}
Error uploading diff: You don't have permission for this (101)
>>> {u'stat': u'fail', u'err': {u'msg': u"You don't have permission for this", u
'code': 101}}
Your review request still exists, but the diff is not attached.


WITH --SUMMARY:

C:\Documents and Settings\user\Desktop\post-review dist>post-
review.exe --se
rver="http://site.com:80"; --username="review_poster" --passwor
d="reviewboard" --submit-as="rrivard" --repository-url="http://
ssourcepn01.paych
ex.com/repos/MMSDevelopment" --revision-range="HEAD:HEAD" --
summary="test" -d
>>> svn info http://svn-server.com/repos/MMSDevelopment
>>> repository info: Path: http://svn-server.com/repos/MMSDevelopment,
Base path: /, Supports changesets: False
>>> svn diff --diff-cmd=diff http://svn-server.com/repos/MMSDevelopment
/@HEAD http://svn-server.com/repos/MMSDevelopment/@HEAD
>>> Looking for 'site.com /' cookie in C:\Documents and Settin
gs\seagleMA\Local Settings\Application Data\.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request for None
>>> HTTP GETting /api/json/repositories/
>>> HTTP GETting /api/json/repositories/1/info/
>>> repository info: Path: http://svn-server.com/repos/MMSDevelopment,
Base path: /, Supports changesets: False
>>> Submitting the review request as rrivard
>>> HTTP POSTing to http://site.com:80/api/json/reviewrequests
/new/: {'repository_path': u'http://svn-server.com/repos/
MMSDevelopment
', 'submit_as': 'rrivard'}
>>> Review request created
>>> Attempting to set field 'summary' to 'test' for review request '54'
>>> HTTP POSTing to http://site.com:80/api/json/reviewrequests
/54/draft/set/: {'summary': 'test'}
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
 <head>
  <title>500 - Internal Server Error | Review Board</title>
 </head>
 <body>
  <h1>Something broke! (Error 500)</h1>
  <p>
   It appears something broke when you tried to go to here. This is
either
   a bug in Review Board or a server configuration error. Please
report
   this to your administrator.
  </p>
 </body>
</title>

Unable to access http://site.com:80/api/json/reviewrequests/54
/draft/set/. The host path may be invalid
HTTP Error 500: Internal Server Error


Along with this, I get an email printing out a stack trace:


Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/usr/lib/python2.5/site-packages/Djblets-0.5beta1-py2.5.egg/
djblets/webapi/decorators.py", line 32, in _checklogin
    response = view_func(request, *args, **kwargs)

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/views/decorators/http.py", line 31, in inner
    return func(request, *args, **kwargs)

  File "/usr/lib/python2.5/site-packages/ReviewBoard-1.0beta2-
py2.5.egg/reviewboard/webapi/json.py", line 848, in
review_request_draft_set
    draft.save()

AttributeError: 'WebAPIResponseError' object has no attribute 'save'


<ModPythonRequest
path:/api/json/reviewrequests/54/draft/set/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'summary': [u'test']}>,
COOKIES:{'rbsessionid': 'c0c7b9fcdd0dd3d090f8dcb83c04bbf6'},
META:{'AUTH_TYPE': None,
 'CONTENT_LENGTH': 0L,
 'CONTENT_TYPE': None,
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_ENCODING': 'identity',
 'HTTP_CONNECTION': 'close',
 'HTTP_CONTENT_LENGTH': '140',
 'HTTP_CONTENT_TYPE': 'multipart/form-data;
boundary=10.2.181.182.1.2184.1240844648.174.2',
 'HTTP_COOKIE': 'rbsessionid=c0c7b9fcdd0dd3d090f8dcb83c04bbf6',
 'HTTP_HOST': 'site.com:80',
 'HTTP_USER_AGENT': 'post-review/0.8',
 'PATH_INFO': u'/api/json/reviewrequests/54/draft/set/',
 'PATH_TRANSLATED': None,
 'QUERY_STRING': None,
 'REMOTE_ADDR': '5.5.5.5.5',
 'REMOTE_HOST': None,
 'REMOTE_IDENT': None,
 'REMOTE_USER': None,
 'REQUEST_METHOD': 'POST',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'site.com',
 'SERVER_PORT': 0,
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'mod_python'}>


Any suggestions?


On Apr 16, 10:24 am, David Ball <[email protected]> wrote:
> Raghu,
>
> I can't help with bulk user loading, but on item 1....
>
> Once you have a working installation of post-review, you can use the
> py2exe to create a windows executable which can be distributed to
> staff (I'm assuming your users are working under windows).
>
> I couldn't find a detailed explanation in the ReviewBoard archive, so
> here's a step-by-step of how I did it (Windows XP Pro SP3, Python
> 2.5.4, Review Board 1.0 alpha 2)
>
> 1) Take as your starting point a working post-review.py script on a
> Windows machine.
>
> 2) Download the py2exe package "py2exe-0.6.9.win32-py2.5.exe" 
> fromhttp://sourceforge.net/project/showfiles.php?group_id=15583and
> install.  (I assume you can use easy_install instead, but I can't make
> it work with our web proxy)
>
> 3) Make sure there are no ".egg" files in the Python site-packages
> folder (C:\Python25\Lib\site-packages). These are zipped and py2exe
> can't handle them. They must be unzipped into folders of the same
> name. If there are do the following:
>     3a) Rename by adding a ".zip" extension after the ".egg" extension.
>     3b) Unzip the extension to a folder with the same name as the
> original ".egg" file.
>
> 4) In the same folder as post-review.py create a setup.py script
> containing exactly the lines below. This will use py2exe to generate
> the executable:
>
>         from distutils.core import setup
>         import py2exe
>
>         setup(
>                 options = {'py2exe': {'bundle_files': 1}},
>                 console = ['post-review.py'],
>                 zipfile = None,
>         )
>
> 5) Run the setup.py script:
>         prompt> python setup.py py2exe
>
> 6) The distributable package (comprising two exes and a DLL) can be
> found in the new dist/ subdirectory.
> The dist folder contents can be copied to client PCs. The
> post-review.exe program works in exactly the same way as the original
> python script it was generated from.
>
> 7) post-review requires GNU diff (at least it does when you're using
> Perforce as I am). Download the GnuWin32 package
> "diffutils-2.8.7-1.exe" 
> fromhttp://gnuwin32.sourceforge.net/packages/diffutils.htm
>
> 8) Run the diffutils installer. Accept the default options except
> where prompted for documentation, which should be deselected as not
> required.
>
> 9) Copy the following files from C:\Program Files\GnuWin32\bin to the
> post-review dist/ subdirectory:
>         diff.exe
>         libiconv2.dll
>         libintl3.dll
>
> 10) Rename the dist/ folder to something descriptive, then ZIP it up
> and distribute to users - alternatively, I was able to build a simple
> Windows installer at no cost using NSIS and HM NIS Edit.
>
> David
>
> On Thu, Apr 16, 2009 at 2:57 PM, Raghu Kaippully <[email protected]> wrote:
>
> > Hi,
>
> > I have been evaluating review board to see if we can use it within our 
> > organization for code reviews. The initial reaction was very good and we 
> > are nearing the end of a pilot phase where we'll roll this out to a large 
> > number of users. I had a couple of questions:
>
> > 1. Our development/build environment is perl based and nobody has python 
> > installed in their machines. This is going to make it hard for installing 
> > post-review. Has somebody thought about creating an installer that  bundles 
> > python, setuptools, all required modules, and post-review into one package? 
> > I tried creating a Windows installer using NSIS and found it quite simple. 
> > Can I conribute that to review board?
>
> > 2. Is there a way to bulk-load all users and groups into the database? If 
> > we do not do that a requester will not be able to add a reviewer in the 
> > review request till the reviewer has logged in at least once.
>
> > Thanks in advance for the help,
> > Raghu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to