Bug 27930

Summary: bugzilla-tool hates Tor Arne Vestbø
Product: WebKit Reporter: Adam Barth <abarth>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, eric, vestbo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch v1 none

Description Adam Barth 2009-08-02 00:52:30 PDT
abarth@zenque:~/git/webkit$ ./WebKitTools/Scripts/bugzilla-tool land-diff 27866 --no-build
Fetching: https://bugs.webkit.org/show_bug.cgi?id=27866&ctype=xml
Guessing "Tor Arne Vestbø" as reviewer from attachment 33856 [details] on bug 27866.
Traceback (most recent call last):
  File "./WebKitTools/Scripts/bugzilla-tool", line 663, in <module>
    main()
  File "./WebKitTools/Scripts/bugzilla-tool", line 660, in main
    return tool.main()
  File "./WebKitTools/Scripts/bugzilla-tool", line 655, in main
    return command_object.execute(command_options, command_args, self)
  File "./WebKitTools/Scripts/bugzilla-tool", line 251, in execute
    self.update_changelogs_with_reviewer(options.reviewer, bug_id, tool)
  File "./WebKitTools/Scripts/bugzilla-tool", line 245, in update_changelogs_with_reviewer
    set_reviewer_in_changelog(changelog, reviewer)
  File "./WebKitTools/Scripts/bugzilla-tool", line 89, in set_reviewer_in_changelog
    print line.replace("NOBODY (OOPS!)", reviewer),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 34: ordinal not in range(128)
Comment 1 David Kilzer (:ddkilzer) 2009-08-02 06:28:50 PDT
The wisdom of the web says this should fix it:

-        print line.replace("NOBODY (OOPS!)", reviewer),
+        print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8"))
Comment 2 David Kilzer (:ddkilzer) 2009-08-02 06:50:53 PDT
Created attachment 33951 [details]
Patch v1

Reviewed by NOBODY (OOPS!).

* Scripts/bugzilla-tool:
(set_reviewer_in_changelog): Made sure reviewer is properly
encoded when calling replace().
---
 2 files changed, 11 insertions(+), 1 deletions(-)
Comment 3 David Kilzer (:ddkilzer) 2009-08-02 07:27:49 PDT
Comment on attachment 33951 [details]
Patch v1

Clearing review flag on attachment: 33951

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/bugzilla-tool
Committed r46700
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/bugzilla-tool
r46700 = eb267d44bd231e0ebd2bff224253aeef38af6591 (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
http://trac.webkit.org/changeset/46700
Comment 4 David Kilzer (:ddkilzer) 2009-08-02 07:27:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Eric Seidel (no email) 2009-08-02 08:00:20 PDT
Does bugzilla 3.0 now have everything encoded as utf8 now?  You would think in this modern world we wouldn't have to re-encode everything all the time. ;)
Comment 6 David Kilzer (:ddkilzer) 2009-08-02 10:20:48 PDT
(In reply to comment #5)
> Does bugzilla 3.0 now have everything encoded as utf8 now?  You would think in
> this modern world we wouldn't have to re-encode everything all the time. ;)

We're using Bugzilla 3.2, and yes, the UTF-8 encoding option is enabled for bugs.webkit.org.

The other thing I just realized is that I landed the patch with "old" version of this tool, and it worked just fine.  Maybe it's related to Adam's local setup?
Comment 7 Adam Barth 2009-08-02 10:22:48 PDT
(In reply to comment #6)
> The other thing I just realized is that I landed the patch with "old" version
> of this tool, and it worked just fine.  Maybe it's related to Adam's local
> setup?

It's possible.  I just use a mac.  Maybe the system version of python needs an upgrade?
Comment 8 Eric Seidel (no email) 2009-08-02 11:06:06 PDT
I've never touched my system version of python, and I've not had trouble.  But this change is also fine. :)