kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: HOTFIX; Encode/decode to utf-8 for commit title IO in kafka-merge-pr.py after KAFKA-2384
Date Tue, 04 Aug 2015 18:32:08 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 4b400afce -> 1a0179f21


HOTFIX; Encode/decode to utf-8 for commit title IO in kafka-merge-pr.py after KAFKA-2384

This fix should be fine for Linux and OS X. Not sure about Windows though. This is a very
specific fix for new functionality added in KAFKA-2384. There are other places where a similar
error could occur, but are less likely.

The script doesn't really support Unicode input at the moment.

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Guozhang

Closes #109 from ijuma/kafka-2384-hotfix and squashes the following commits:

0ab8958 [Ismael Juma] Encode/decode to utf-8 for commit title IO in kafka-merge-pr.py


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/1a0179f2
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/1a0179f2
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/1a0179f2

Branch: refs/heads/trunk
Commit: 1a0179f21a3937065fea2b745de67967bcafcb68
Parents: 4b400af
Author: Ismael Juma <ismael@juma.me.uk>
Authored: Tue Aug 4 11:33:03 2015 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Aug 4 11:33:03 2015 -0700

----------------------------------------------------------------------
 kafka-merge-pr.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/1a0179f2/kafka-merge-pr.py
----------------------------------------------------------------------
diff --git a/kafka-merge-pr.py b/kafka-merge-pr.py
index 576d315..5e8cbf5 100644
--- a/kafka-merge-pr.py
+++ b/kafka-merge-pr.py
@@ -381,7 +381,7 @@ def main():
     url = pr["url"]
 
     pr_title = pr["title"]
-    commit_title = raw_input("Commit title [%s]: " % pr_title)
+    commit_title = raw_input("Commit title [%s]: " % pr_title.encode("utf-8")).decode("utf-8")
     if commit_title == "":
         commit_title = pr_title
 


Mime
View raw message