Labels: Type-Defect Priority-Medium
New issue 3425 by thom.ger...@gmail.com: PySVN, UTF-8 file with
svn:keywords set raises exception trying to upload diff.
What version are you running?
2.0.1 and master (traceback is from master)
What's the URL of the page containing the problem?
and also posting from rbt post.
What steps will reproduce the problem?
1. Add a SVN repo to reviewboard.
2. In that repo, commit a file with UTF-8 data ("utf8_file.txt"), and
a "$Id $" line
3. Also propset svn:keywords "Id" utf8_file.txt
4. Commit the file.
5. Make a change to the file.
6. Post for review.
What is the expected output?
The review is posted.
What do you see instead?
On /r/new/, user gets no indication there was a failure. From rbt, they
ERROR: Error uploading diff
One or more fields had errors (HTTP 400, API Error 105)
path: 'ascii' codec can't decode byte 0xef in position 0: ordinal not
Your review request still exists, but the diff is not attached.
What operating system are you using? What browser?
Please provide any additional information below.
Traceback (most recent call last):
File "reviewboard/reviewboard/webapi/resources/diff.py", line 292, in
File "reviewboard/reviewboard/reviews/forms.py", line 116, in create
File "reviewboard/reviewboard/diffviewer/forms.py", line 69, in create
File "reviewboard/reviewboard/diffviewer/managers.py", line 156, in
File "reviewboard/reviewboard/diffviewer/managers.py", line 182, in
File "reviewboard/reviewboard/diffviewer/managers.py", line 300, in
File "reviewboard/reviewboard/scmtools/models.py", line 239, in
File "reviewboard/reviewboard/scmtools/models.py", line 434, in
exists = self.get_scmtool().file_exists(path, revision)
File "reviewboard/reviewboard/scmtools/core.py", line 156, in file_exists
File "reviewboard/reviewboard/scmtools/svn/__init__.py", line 117, in
return self.client.get_file(path, revision)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 106, in
return self._do_on_path(self._get_file_data, path, revision)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 72, in
return cb(normpath, normrev)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 100, in
data = self.collapse_keywords(data, keywords[normpath])
File "reviewboard/reviewboard/scmtools/svn/base.py", line 118, in
File "rb_2.0/lib/python2.7/re.py", line 151, in sub
return _compile(pattern, flags).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0:
ordinal not in range(128)
utf8-file.txt 153 bytes
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.