/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tools/fixed-in.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3
 
1
#!/usr/bin/python
2
2
 
3
3
# Simple script that will output the release where a given bug was fixed
4
4
# searching the NEWS file
10
10
 
11
11
class NewsParser(object):
12
12
 
13
 
    paren_exp_re = re.compile(r'\(([^)]+)\)')
 
13
    paren_exp_re = re.compile('\(([^)]+)\)')
14
14
    release_re = re.compile("brz[ -]")
15
15
    release_prefix_length = len('brz ')
16
16
    bugs_re = re.compile('#([0-9]+)')
51
51
    def try_date(self):
52
52
        if self.release is None:
53
53
            return False
54
 
        date_re = re.compile(r':%s: (NOT RELEASED YET|\d{4}-\d{2}-\d{2})'
 
54
        date_re = re.compile(':%s: (NOT RELEASED YET|\d{4}-\d{2}-\d{2})'
55
55
                             % (self.release,))
56
56
        match = date_re.match(self.lrs)
57
57
        if match is not None:
58
58
            self.date = match.group(1)
59
59
            return True
60
60
        # The old fashion way
61
 
        released_re = re.compile(r':Released:\s+(\d{4}-\d{2}-\d{2})')
 
61
        released_re = re.compile(':Released:\s+(\d{4}-\d{2}-\d{2})')
62
62
        match = released_re.match(self.lrs)
63
63
        if match is not None:
64
64
            self.date = match.group(1)