Bug 212425

Summary: webkit-patch create-revert cannot handle reason string with Unicode characters (like smart quotes)
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: aakash_jain, ap, ddkilzer, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=212422

Description Yusuke Suzuki 2020-05-27 11:47:54 PDT
If we pass non-ascii reason text to this command, it fails.

Traceback (most recent call last):
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkit-patch", line 80, in <module>
    main()
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkit-patch", line 75, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py", line 62, in run
    message = self._message_for_revert(state["revision_list"], state["reason"], state["description_list"], reverted_bug_url_list, revert_bug_url)
  File "/home/yusukesuzuki/dev/OpenSource/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py", line 48, in _message_for_revert
    message += "\"%s\"\n" % description_list[index]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 79: ordinal not in range(128)
Comment 1 David Kilzer (:ddkilzer) 2020-05-27 11:54:26 PDT
See:  Bug 212422: REGRESSION(r260023): “Regression in ITP sparse plist decoding.”
Comment 2 David Kilzer (:ddkilzer) 2020-05-27 11:55:49 PDT
Note that Slack appears to default to using smart quotes.
Comment 3 Jonathan Bedard 2020-05-27 12:50:01 PDT
(In reply to David Kilzer (:ddkilzer) from comment #2)
> Note that Slack appears to default to using smart quotes.

We should fix this bug, but I also think that we should convert smart quotes to normal quotes.
Comment 4 Radar WebKit Bug Importer 2020-06-06 21:16:52 PDT
<rdar://problem/64081137>