Status: New
Owner:
Labels: Type-Defect Priority-Medium
New issue 3895 by ali.kam...@visiercorp.com: UnicodeDecodeError when
posting reviews
https://code.google.com/p/reviewboard/issues/detail?id=3895
*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.
What version are you running?
RBTools 0.7.3
What's the URL of the page containing the problem?
http://reviews.internal
What steps will reproduce the problem?
1. Setup a mercurial repository with two committed files: fileA and fileB.
Make sure fileA and fileB have some contents.
2. Remove fileA from the repository
3. Edit fileB and add a unicode copy right symbol:
//
// Copyright © [2010-2015] ...
//
4. Add a new *empty* file to the repository: fileC
4. Run rbt post
What is the expected output? What do you see instead?
I expect a review request to be posted, instead I get this error from rbt:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 476:
ordinal not in range(128)
What operating system are you using? What browser?
Windows 7, Mercurial 3.4.1
Please provide any additional information below.
When a new empty file is added rbt tries to add a custom string to the diff
so that the review contains the fact that a new empty file has been added:
mercurial.py:
for filename in added_empty_files:
if filename not in exclude_files:
diff += ('diff -r %s -r %s %s\n' ...
The problem is the left hand side (diff) is a unicode string in this case
because of the copyright symbol. Python generates a UnicodeDecodeError if
the right encoding is not set.
--
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.