Issues with post-review in Windows.

16 views
Skip to first unread message

Max N

unread,
Sep 5, 2008, 10:21:09 AM9/5/08
to reviewboard
Hello guys. I am having issues while trying to post a diff with post-
review from my windows box. I'm using the latest version of post-
review, with Python2.4 and MinGW32.

When I run "python post-review", review request is posted to the
server but I see no files in it. This is the output I get running with
-d (repository path changed to XXX for security reasons):

>>> Repository info 'Path: http://devel.livra.com/svn, Base path: /comparativo/frontend/cereza/trunk, Supports changesets: False'
>>> svn diff --diff-cmd=diff
>>> svn info src/main/com/livra/cereza/application/product/MercadoLibreSearcher.java
>>> svn info src/webapp/WEB-INF/web.xml
>>> svn info src/main/com/livra/cereza/application/product/MercadoLibreSearcher.java
>>> svn info src/main/com/livra/cereza/application/product/MercadoLibreSearcher.java
>>> svn info src/main/com/livra/cereza/application/product/MercadoLibreSearcher.java
>>> svn info src/webapp/WEB-INF/web.xml
>>> svn info src/webapp/WEB-INF/web.xml
>>> svn info src/webapp/WEB-INF/web.xml
>>> Looking for '192.168.0.38 /' cookie in C:\Documents and Settings\maximiliano\Local Settings\Application Data\.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request for None
>>> HTTP POSTing to http://192.168.0.38:8123/api/json/reviewrequests/new/: {'repository_path': 'http://XXX/XXX'}
>>> Review request created
>>> Uploading diff, size: 1534
>>> HTTP POSTing to http://192.168.0.38:8123/api/json/reviewrequests/8/diff/new/: {'basedir': '/comparativo/frontend/cereza/trunk'}
Error uploading diff: One or more fields had errors (105)
>>> {u'fields': {u'path': [u'The diff file is empty']}, 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.

Anybody have a clue that may help me find out what's going on?

Thanks!

Max

Christian Hammond

unread,
Sep 5, 2008, 5:54:07 PM9/5/08
to revie...@googlegroups.com
Run with --output-diff and see if what it generates looks sane.

It may be that the diff is fine but that it's unable to see the repository for whatever reason. See what happens when you upload the result of --output-diff using the web UI.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Nathan Heijermans

unread,
Sep 5, 2008, 6:04:00 PM9/5/08
to revie...@googlegroups.com
I have been having the same issues with a Fedora 9 Linux install; I
think running Python 2.5. I tried manually filling in the summary and
description fields, but that still didn't work.

Nathan

Terry Rankine

unread,
Sep 7, 2008, 9:26:57 PM9/7/08
to revie...@googlegroups.com
Hi

The command that issues svn info - has funky end of line characters, which makes the decoding of the base url wrong, which makes the replace slashes command wrong, which leads to a diff which is missing the lead slashes, which leads to the diff being wrong.

the fix? do a strip on incoming values.
    def svn_info(self, path):
        """Return a dict which is the result of 'svn info' at a given path."""
        svninfo = {}
        for info in execute(["svn", "info", path],
                            split_lines=True):
            parts = info.strip().split(": ", 1)


notice the strip() hidden in the last line.

Terry Rankine

cthibert

unread,
Sep 8, 2008, 10:30:49 AM9/8/08
to reviewboard
Hi,

I was experiencing the same problem in FC8. Just wanted to confirm
that this fix worked.

Chuck

On Sep 7, 9:26 pm, "Terry Rankine" <terry.rank...@gmail.com> wrote:
> Hi
>
> The command that issues svn info - has funky end of line characters, which
> makes the decoding of the base url wrong, which makes the replace slashes
> command wrong, which leads to a diff which is missing the lead slashes,
> which leads to the diff being wrong.
>
> the fix? do a strip on incoming values.
>     def svn_info(self, path):
>         """Return a dict which is the result of 'svn info' at a given
> path."""
>         svninfo = {}
>         for info in execute(["svn", "info", path],
>                             split_lines=True):
>             parts = info.strip().split(": ", 1)
>
> notice the strip() hidden in the last line.
>
> Terry Rankine
>
> > >>>> HTTP POSTing tohttp://192.168.0.38:8123/api/json/reviewrequests/new/:

Terry Rankine

unread,
Sep 8, 2008, 9:27:30 PM9/8/08
to revie...@googlegroups.com
since i have 'mauled' the actual original file - do you mind generating the diff and posting it back to the reviewboard's reviewboard and then get it back into the source?

Terry Rankine

Max N

unread,
Sep 10, 2008, 10:32:03 AM9/10/08
to reviewboard
Terry, it worked like a charm!

I've submitted a review with your suggested change:

http://reviews.review-board.org/r/536/

Thanks a bunch.

Max

On Sep 8, 10:27 pm, "Terry Rankine" <terry.rank...@gmail.com> wrote:
> since i have 'mauled' the actual original file - do you mind generating the
> diff and posting it back to the reviewboard's reviewboard and then get it
> back into the source?
>
> Terry Rankine
>
> > > >http://192.168.0.38:8123/api/json/reviewrequests/8/diff/new/:{'basedir<http://192.168.0.38:8123/api/json/reviewrequests/8/diff/new/:%7B%27ba...>
> > ':
Reply all
Reply to author
Forward
0 new messages