~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/check-newsbugs.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
try:
13
13
    import hydrazine
14
14
except ImportError:
15
 
    print "Please install hydrazine from lp:hydrazine"
 
15
    print "Please install hydrazine from lp:launchpadlib"
16
16
    sys.exit(1)
17
17
 
18
18
 
19
 
options, args = getopt.gnu_getopt(sys.argv, "lw", ["launchpad", 'webbrowser'])
 
19
options, args = getopt.gnu_getopt(sys.argv, "l", ["launchpad"])
20
20
options = dict(options)
21
21
 
22
22
if len(args) == 1:
23
 
    print ("Usage: check-newsbugs [--launchpad][--webbrowser] "
24
 
           "doc/en/release-notes/bzr-x.y.txt")
 
23
    print "Usage: check-newsbugs [--launchpad] NEWS"
25
24
    print "Options:"
26
25
    print "--launchpad     Print out Launchpad mail commands for closing bugs "
27
26
    print "                that are already fixed."
28
 
    print "--webbrowser    Open launchpad bug pages for bugs that are already "
29
 
    print "                fixed."
30
27
    sys.exit(1)
31
28
 
32
29
 
33
30
def report_notmarked(bug, task, section):
34
 
    print
 
31
    print 
35
32
    print "Bug %d was mentioned in NEWS but is not marked fix released:" % (bug.id, )
36
33
    print "Launchpad title: %s" % bug.title
37
34
    print "NEWS summary: "
40
37
        print "  bug %d" % bug.id
41
38
        print "  affects %s" % task.bug_target_name
42
39
        print "  status fixreleased"
43
 
    if "--webbrowser" in options or "-w" in options:
44
 
        import webbrowser
45
 
        webbrowser.open('http://pad.lv/%s>' % (bug.id,))
46
40
 
47
41
 
48
42
def read_news_bugnos(path):
89
83
            print '%s is private and cannot be accessed' % (bugno,)
90
84
            continue
91
85
        raise
92
 
 
 
86
     
93
87
    found_bzr = False
94
88
    fix_released = False
95
89
    for task in bug.bug_tasks: