Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-09-24 Thread reviewboard


Comment #7 on issue 2155 by jerb...@gmail.com: post-review fails to upload  
diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

Thanks!

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-09-23 Thread reviewboard


Comment #5 on issue 2155 by chip...@gmail.com: post-review fails to upload  
diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

Issue 2300 has been merged into this issue.

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-09-23 Thread reviewboard

Updates:
Status: Fixed
Owner: chip...@gmail.com
Labels: Milestone-RBTools-Release1.0 Component-RBTools

Comment #6 on issue 2155 by chip...@gmail.com: post-review fails to upload  
diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

Fixed on release-0.3.x (0fff56d)

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-08-31 Thread reviewboard


Comment #4 on issue 2155 by jerb...@gmail.com: post-review fails to upload  
diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

Proposed fix in a review request here:  
http://reviews.reviewboard.org/r/2568/


--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-08-30 Thread reviewboard


Comment #3 on issue 2155 by truan.h...@kssretail.com: post-review fails to  
upload diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

Seeing this with RBTools 0.3.3 / latest 'nightly' file and Python 2.7

After reading this issue 11898 on the python site that seemed to be related  
(http://bugs.python.org/issue11898) I made a change to my local  
post-review.py and changed line 985 (in http_post method) from

r = urllib2.Request(url, body, headers)
to
r = urllib2.Request(str(url), body, headers)

fixed the issue I was having (BOM in the diff)

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-07-21 Thread reviewboard


Comment #2 on issue 2155 by tim.na...@googlemail.com: post-review fails to  
upload diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

This appears to be caused by a change to the http lib in Python 2.7. There  
is some discussion on it in this thread -  
http://groups.google.com/group/reviewboard/browse_thread/thread/a406e73e7c13996f/9e1d7f2c662db181?hl=enlnk=gstq=UnicodeDecodeError+with+Visual+Studio+files#9e1d7f2c662db181


I found downgrading to Python 2.6 resolved the issue.

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-06-28 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 2155 by jerb...@gmail.com: post-review fails to upload diff if  
non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

What version are you running?
RBTools v0.3.2

What steps will reproduce the problem?
1. use post-review to upload the attached patch for a review (note it works  
in the browser)


Also, I'm aware that this seems to be a problem in Python 2.7's urllib.py  
(perhaps an Ubuntu only problem, I don't know).


What is the expected output? What do you see instead?
Expected: Patch gets uploaded without a problem using post-review. Actual:  
See stack trace below.


What operating system are you using? What browser?
I'm on Ubuntu 11.04, Firefox (totally unrelated for this problem)

Here is an example stack trace:
HTTP POSTing to  
http://review.markusproject.org/api/review-requests/1048/diffs/: {}

Traceback (most recent call last):
  File /usr/local/bin/post-review, line 9, in module
load_entry_point('RBTools==0.3.2', 'console_scripts', 'post-review')()
   
File /usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py,  
line 3794, in main

submit_as=options.submit_as)
   
File /usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py,  
line 3460, in tempt_fate

parent_diff_content)
   
File /usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py,  
line 769, in upload_diff

fields, files)
   
File /usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py,  
line 982, in api_post

return self.process_json(self.http_post(path, fields, files))
   
File /usr/local/lib/python2.7/dist-packages/RBTools-0.3.2-py2.7.egg/rbtools/postreview.py,  
line 903, in http_post

data = urllib2.urlopen(r).read()
  File /usr/lib/python2.7/urllib2.py, line 126, in urlopen
return _opener.open(url, data, timeout)
  File /usr/lib/python2.7/urllib2.py, line 391, in open
response = self._open(req, data)
  File /usr/lib/python2.7/urllib2.py, line 409, in _open
'_open', req)
  File /usr/lib/python2.7/urllib2.py, line 369, in _call_chain
result = func(*args)
  File /usr/lib/python2.7/urllib2.py, line 1185, in http_open
return self.do_open(httplib.HTTPConnection, req)
  File /usr/lib/python2.7/urllib2.py, line 1154, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
  File /usr/lib/python2.7/httplib.py, line 955, in request
self._send_request(method, url, body, headers)
  File /usr/lib/python2.7/httplib.py, line 989, in _send_request
self.endheaders(body)
  File /usr/lib/python2.7/httplib.py, line 951, in endheaders
self._send_output(message_body)
  File /usr/lib/python2.7/httplib.py, line 809, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14060:  
ordinal not in range(128)


Not sure if that will be helpful:

$ locale
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en
LC_CTYPE=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LC_COLLATE=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_MESSAGES=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_ADDRESS=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_ALL=

Attachments:
sub_tabs.diff  15.8 KB

--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.



Re: Issue 2155 in reviewboard: post-review fails to upload diff if non-ascii characters are used in diff

2011-06-28 Thread reviewboard


Comment #1 on issue 2155 by jerb...@gmail.com: post-review fails to upload  
diff if non-ascii characters are used in diff

http://code.google.com/p/reviewboard/issues/detail?id=2155

BTW. I'm using --diff-filename. Here is the script we use (which in turn  
uses post-review):  
https://github.com/MarkUsProject/Markus/blob/master/lib/tools/post-markus-review


--
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.