~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/check-newsbugs.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-26 20:42:13 UTC
  • mto: This revision was merged to the branch mainline in revision 5924.
  • Revision ID: v.ladeuil+lp@free.fr-20110526204213-vvwv0hshlwsnzv49
Add an option to check-newsbug to get a quicker access to bugs that needs to be closed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    sys.exit(1)
17
17
 
18
18
 
19
 
options, args = getopt.gnu_getopt(sys.argv, "l", ["launchpad"])
 
19
options, args = getopt.gnu_getopt(sys.argv, "lw", ["launchpad", 'webbrowser'])
20
20
options = dict(options)
21
21
 
22
22
if len(args) == 1:
23
 
    print "Usage: check-newsbugs [--launchpad] NEWS"
 
23
    print ("Usage: check-newsbugs [--launchpad][--webbrowser] "
 
24
           "doc/en/release-notes/bzr-x.y.txt")
24
25
    print "Options:"
25
26
    print "--launchpad     Print out Launchpad mail commands for closing bugs "
26
27
    print "                that are already fixed."
 
28
    print "--webbrowser    Open launchpad bug pages for bugs that are already "
 
29
    print "                fixed."
27
30
    sys.exit(1)
28
31
 
29
32
 
37
40
        print "  bug %d" % bug.id
38
41
        print "  affects %s" % task.bug_target_name
39
42
        print "  status fixreleased"
 
43
    if "--webbrowser" in options or "-w" in options:
 
44
        import webbrowser
 
45
        webbrowser.open('http://pad.lv/%s>' % (bug.id,))
40
46
 
41
47
 
42
48
def read_news_bugnos(path):