From c5ecbc1d42605251223b8047593318904cd5a6b6 Mon Sep 17 00:00:00 2001 From: e0d Date: Wed, 18 Dec 2013 21:47:49 -0500 Subject: [PATCH 1/2] script bombs if comments include unicode --- scripts/release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index b406fdac8547..b93a49e4695b 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -105,7 +105,7 @@ def generate_table(commit_range, include_merge=False): for i, commit in enumerate(commits): rows.append("| {author} | {summary} | {commit} | {jira} | {verified} |".format( author=email if i == 0 else "", - summary=commit.summary.replace("|", "\|"), + summary=commit.summary.replace("|", "\|").encode('ascii',errors='ignore'), commit=commit_link.format(sha=commit.hexsha), jira=", ".join(parse_ticket_references(commit.message)), verified="", From 6134bb538490b9db09fb294b0839a8ca7345aadf Mon Sep 17 00:00:00 2001 From: e0d Date: Thu, 19 Dec 2013 23:09:23 -0500 Subject: [PATCH 2/2] cr comments --- scripts/release.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index b93a49e4695b..e542abdd92c4 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -97,20 +97,20 @@ def generate_table(commit_range, include_merge=False): """ Return a string corresponding to a commit table to embed in Confluence """ - header = "||Author||Summary||Commit||JIRA||Verified?||" + header = u"||Author||Summary||Commit||JIRA||Verified?||" commit_link = "[commit|https://github.com/edx/edx-platform/commit/{sha}]" rows = [header] cbe = commits_by_email(commit_range, include_merge) for email, commits in cbe.items(): for i, commit in enumerate(commits): - rows.append("| {author} | {summary} | {commit} | {jira} | {verified} |".format( + rows.append(u"| {author} | {summary} | {commit} | {jira} | {verified} |".format( author=email if i == 0 else "", - summary=commit.summary.replace("|", "\|").encode('ascii',errors='ignore'), + summary=commit.summary.replace("|", "\|"), commit=commit_link.format(sha=commit.hexsha), jira=", ".join(parse_ticket_references(commit.message)), verified="", )) - return "\n".join(rows) + return u"\n".join(rows) def generate_email(commit_range, release_date=None):