WebKitGTK/Releasing: gtk-release-notes

File gtk-release-notes, 1.5 KB (added by Carlos Garcia Campos, 13 years ago)

Script to get information about bugs fixed since a given release

Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4from webkitpy.common.checkout.scm import default_scm
5from webkitpy.common.checkout.checkout import Checkout
6from webkitpy.common.system.executive import Executive
7from webkitpy.common.net.bugzilla import Bugzilla
8from xml.sax.saxutils import unescape
9import sys
10import os
11
12scm = default_scm()
13
14gtk_dirs = ['gtk', 'gobject', 'soup', 'cairo', 'gstreamer']
15log_dirs = []
16for root, dirs, dummy in os.walk(scm.checkout_root):
17 for d in dirs:
18 if d in gtk_dirs:
19 log_dirs.append(os.path.join(root, d))
20
21command = ['git', 'log', '--pretty=%H', sys.argv[1] + '..', '--']
22command.extend (log_dirs)
23revisions = Executive().run_command(command).splitlines()
24
25co = Checkout(scm)
26bugs = {}
27for rev in revisions:
28 info = co.commit_info_for_revision(scm.svn_revision_from_git_commit(rev))
29 if not info:
30 print "Error: no commit info found for git revision %s" % (rev)
31 continue
32 bug_id = info.bug_id()
33 if bug_id:
34 author_name = info.author_name()
35 authors = bugs.setdefault(bug_id, [])
36 if author_name not in authors:
37 authors.append(author_name)
38
39bugzilla = Bugzilla()
40for bug_id in bugs:
41 try:
42 bug_title = bugzilla.fetch_bug_dictionary(bug_id)['title']
43 except:
44 print "Error getting info for bug #%s" % (bug_id)
45 continue
46 bug_title = unescape(bug_title, {"'": "'", """: '"'})
47 print u"Bug %s%s (%s)" % (bug_id, bug_title, ", ".join (bugs[bug_id]))