I am having a problem using ReviewBoard 1.6 with Perforce. When I run
post-review for a changelist with new files, I get an error while
posting the diffs. (post-review debug trace below). I have tried
uploading the diffs manually after generating them with post-review,
but I just get "malformed patch" errors on the server. This looks like
Issue 2054 to me, and I posted my information there.

Does anyone have this working or know of a workaround?


>>> RBTools 0.3.3
>>> Home = C:\Users\ben\AppData\Roaming
>>> p4 info
>>> repository info: Path: lenel-sourceold.windows.lenel.com:1666, Base
>>> path: None, Supports changesets: True
>>> p4 counters
>>> HTTP GETting api/
>>> HTTP GETting
>>> Using the new web API
>>> Generating diff for changenum 206994
>>> p4 describe -s 206994
>>> Processing edit of //Development/Path/To/My/src/Solution.sln
>>> Writing "//Development/Path/To/My/src/Solution.sln#10"
>>> to "c:\users\ben\appdata\local\temp\tmp5eiypf"
>>> p4 print -o c:\users\ben\appdata\local\temp\tmp5eiypf -q
>>> //Development/Path/To/My/src/Solution.sln#10
>>> diff -urNp c:\users\ben\appdata\local\temp\tmp5eiypf
>>> D:/Development\Path\To\My\src\Solution.sln
>>> Processing add of
>>> //Development/OnGuard/Branches/Titan/DotNet/src/TwoFlower/app.config
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\app.config
>>> Processing add of //Development/Path/To/My/src/TwoFlower/PrincipalExt.cs
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\Principal.cs
>>> Processing add of //Development/Path/To/My/src/TwoFlower/Program.cs
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\Program.cs
>>> Processing add of
>>> //Development/Path/To/My/src/TwoFlower/Properties/AssemblyInfo.cs
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\Properties\AssemblyInfo.cs
>>> Processing add of
>>> //Development/Path/To/My/src/TwoFlower/TwoFlower.csproj
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\TwoFlower.csproj
>>> Processing add of
>>> //Development/Path/To/My/src/TwoFlower/WrappedServer.cs
>>> diff -urNp c:\users\ben\appdata\local\temp\tmporoe81
>>> D:/Development\Path\To\My\src\TwoFlower\WrappedServer.cs
>>> Attempting to create review request on
>>> lenel-sourceold.windows.lenel.com:1666 for 206994
>>> HTTP POSTing to
>>> {'changenum': '206994', 'repository': 
>>> 'lenel-sourceold.windows.lenel.com:1666'}
>>> Got API Error 204 (HTTP code 409): The change number specified has
>>> already been used
>>> Error data: {u'stat': u'fail', u'review_request': {u'status':
>>> u'pending', u'last_updated': u'2011-09-13 17:28:43', u'description':
>>> u'Test rig for using two embedded application servers\n', u'links':
>>> {u'diffs': {u'href':
>>> u'', u'method': u'GET'},
>>> u'repository': {u'href': u'',
>>> u'method': u'GET', u'title': u'Old OnGuard Repository'}, u'changes':
>>> {u'href': u'',
>>> u'method': u'GET'}, u'self': {u'href':
>>> u'', u'method': u'GET'},
>>> u'update': {u'href': u'',
>>> u'method': u'PUT'}, u'last_update': {u'href':
>>> u'', u'method':
>>> u'GET'}, u'reviews': {u'href':
>>> u'', u'method':
>>> u'GET'}, u'draft': {u'href':
>>> u'',u'method': u'GET'},
>>> u'file_attachments': {u'href':
>>> u'',
>>> u'method': u'GET'}, u'submitter': {u'href':
>>> u'', u'method': u'GET', u'title':
>>> u'ben'},u'screenshots': {u'href':
>>> u'', u'method':
>>> u'GET'}, u'delete': {u'href':
>>> u'', u'method': u'DELETE'}},
>>> u'target_groups': [], u'bugs_closed': [], u'changenum': 206994,
>>> u'target_people': [], u'testing_done': u'', u'branch': u'', u'id': 5,
>>> u'time_added': u'2011-09-13 17:28:43', u'summary': u'Test rig for using
>>> two embedded application servers', u'public': False}, u'err': {u'msg':
>>> u'The change number specified has already been used', u'code': 204}}
>>> Review request already exists. Updating it...
>>> HTTP PUTting to
>>> {'changenum': 206994}
>>> Uploading diff, size: 16111
>>> HTTP POSTing to {}

Traceback (most recent call last):
   File "c:\Python27\Scripts\post-review-script.py", line 8, in
     load_entry_point('rbtools==0.3.3', 'console_scripts', 'post-
File "c:\Python27\lib\site-packages\rbtools-0.3.3-py2.7.egg\rbtools
\postreview.p y",
line 4004, in main
File "c:\Python27\lib\site-packages\rbtools-0.3.3-py2.7.egg\rbtools
\postreview.p y",
line 3663, in tempt_fate
File "c:\Python27\lib\site-packages\rbtools-0.3.3-py2.7.egg\rbtools
\postreview.p y",
line 852, in upload_diff
File "c:\Python27\lib\site-packages\rbtools-0.3.3-py2.7.egg\rbtools
\postreview.p y",
line 1065, in api_post
File "c:\Python27\lib\site-packages\rbtools-0.3.3-py2.7.egg\rbtools
\postreview.p y",
line 986, in http_post
   File "c:\Python27\lib\urllib2.py", line 126, in urlopen
     return _opener.open(url, data, timeout)
   File "c:\Python27\lib\urllib2.py", line 394, in open
     response = self._open(req, data)
   File "c:\Python27\lib\urllib2.py", line 412, in _open
     '_open', req)
   File "c:\Python27\lib\urllib2.py", line 372, in _call_chain
     result = func(*args)
   File "c:\Python27\lib\urllib2.py", line 1199, in http_open
     return self.do_open(httplib.HTTPConnection, req)
   File "c:\Python27\lib\urllib2.py", line 1168, in do_open
     h.request(req.get_method(), req.get_selector(), req.data,
   File "c:\Python27\lib\httplib.py", line 955, in request
     self._send_request(method, url, body, headers)
   File "c:\Python27\lib\httplib.py", line 989, in _send_request
   File "c:\Python27\lib\httplib.py", line 951, in endheaders
   File "c:\Python27\lib\httplib.py", line 809, in _send_output
     msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
ordinal not in range(128)

Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to