Status: New
Owner: ----
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.
http://code.google.com/p/reviewboard/issues/detail?id=3425

What version are you running?
2.0.1 and master (traceback is from master)

What's the URL of the page containing the problem?

/r/new/
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 get
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 in range(128)

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 create
    request.FILES.get('parent_diff_path'))
  File "reviewboard/reviewboard/reviews/forms.py", line 116, in create
    history)
  File "reviewboard/reviewboard/diffviewer/forms.py", line 69, in create
    request=self.request)
File "reviewboard/reviewboard/diffviewer/managers.py", line 156, in create_from_upload
    save=save)
File "reviewboard/reviewboard/diffviewer/managers.py", line 182, in create_from_data
    check_existence=(not parent_diff_file_contents)))
File "reviewboard/reviewboard/diffviewer/managers.py", line 300, in _process_files
    request=request))):
File "reviewboard/reviewboard/scmtools/models.py", line 239, in get_file_exists
    base_commit_id, request)
File "reviewboard/reviewboard/scmtools/models.py", line 434, in _get_file_exists_uncached
    exists = self.get_scmtool().file_exists(path, revision)
  File "reviewboard/reviewboard/scmtools/core.py", line 156, in file_exists
    self.get_file(path, revision)
File "reviewboard/reviewboard/scmtools/svn/__init__.py", line 117, in get_file
    return self.client.get_file(path, revision)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 106, in get_file
    return self._do_on_path(self._get_file_data, path, revision)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 72, in _do_on_path
    return cb(normpath, normrev)
File "reviewboard/reviewboard/scmtools/svn/pysvn.py", line 100, in _get_file_data
    data = self.collapse_keywords(data, keywords[normpath])
File "reviewboard/reviewboard/scmtools/svn/base.py", line 118, in collapse_keywords
    repl, data)
  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)


Attachments:
        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:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to