]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: ceph-release-notes unicode handling 5467/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 4 Aug 2015 14:06:23 +0000 (16:06 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 4 Aug 2015 17:23:25 +0000 (19:23 +0200)
Prefix the print string with u so that it handles unicode gracefully.

Add the cli prefix (for ceph.in related pull requests)

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/script/ceph-release-notes

index e59efd353cac58f78f9fcb6ed16f95ce8f5201e9..007054d52f02c5dad30519c2588577e2106e82eb 100755 (executable)
@@ -64,7 +64,7 @@ def make_release_notes(gh, repo, ref, plaintext):
 
             title = pr['title']
 
-            title_re = '^(common|mon|osd|fs|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|doc|crush|librados):'
+            title_re = '^(cli|common|mon|osd|fs|librbd|rbd|fs|mds|objecter|rgw|build/ops|tests|tools|doc|crush|librados):'
             if not re.match(title_re, title):
                 print ("ERROR: http://github.com/ceph/ceph/pull/" + str(number) + " title " + title + " does not match " + title_re)
             # Big assumption, do a sanity check in the end, we are
@@ -80,9 +80,9 @@ def make_release_notes(gh, repo, ref, plaintext):
             print (">>>>>>> " + str(len(prs)) + " pr for issue " + issue)
         for (author, title, number) in prs:
             if plaintext:
-                print ("* {title} (#{issue}, {author})".format(title=title, issue=issue, author=author))
+                print (u"* {title} (#{issue}, {author})".format(title=title, issue=issue, author=author))
             else:
-                print ("* {title} (`issue#{issue} <http://tracker.ceph.com/issues/{issue}>`_, `pr#{number} <http://github.com/ceph/ceph/pull/{number}>`_, {author})".format(title=title, issue=issue, author=author, number=number))
+                print (u"* {title} (`issue#{issue} <http://tracker.ceph.com/issues/{issue}>`_, `pr#{number} <http://github.com/ceph/ceph/pull/{number}>`_, {author})".format(title=title, issue=issue, author=author, number=number))
 
 
 if __name__ == "__main__":