Closed
Bug 1396129
Opened 8 years ago
Closed 8 years ago
mozreview doesn't handle non-ASCII in certain conditions
Categories
(MozReview Graveyard :: Integration: Git, enhancement)
MozReview Graveyard
Integration: Git
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1236738
People
(Reporter: mrbkap, Unassigned)
Details
Sorry for the vague summary. The problem that I ran into was that I wanted to request review from someone who had reviews turned off. Here's the output:
$ git mozreview push
adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 1 files
submitting 1 commits for review
commit: 7dfc6fd Bug 1368343 - Be paranoid about null TabChild. r=mconley
review: https://reviewboard.mozilla.org/r/175200 (draft)
publish these review requests now (Yn)?
Traceback (most recent call last):
File "/home/mrbkap/.mozbuild/version-control-tools/git/commands/git-mozreview", line 901, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/mrbkap/.mozbuild/version-control-tools/git/commands/git-mozreview", line 883, in main
return push_command(args)
File "/home/mrbkap/.mozbuild/version-control-tools/git/commands/git-mozreview", line 553, in push_command
item['rrid'], item['error']))
File "/usr/local/lib/python2.7/dist-packages/mercurial/ui.py", line 865, in write
self._write(*msgs, **opts)
File "/usr/local/lib/python2.7/dist-packages/mercurial/ui.py", line 873, in _write
self.fout.write(a)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 100-101: ordinal not in range(128)
so publish_review_request returned an error and we threw an exception attempting to output that error.
In this case, the reviewer's bugzilla name was "Mike Conley (:mconley) (:⚙️) - (PTO August 28 - Sept 1)" (note the gear emoji, U+2699 in his name). Therefore, when setting the review request failed with the message "Mike Conley... isn't accepting reviews", we tried to print that to the console and failed.
One note: this could be user error on my part. After googling, I found references to PYTHONIOENCODING=utf-8 which seems like it would fix this by forcing stdio/stderr to use utf-8 instead of ascii for its codec.
You need to log in
before you can comment on or make changes to this bug.
Description
•