~landscape/tarmac/ls-trunk-u1-trunk

« back to all changes in this revision

Viewing changes to tarmac/plugins/bugresolver.py

  • Committer: David Britton
  • Date: 2013-09-17 21:54:21 UTC
  • mfrom: (423.1.14 fixed-defects-from-mp)
  • Revision ID: david.britton@canonical.com-20130917215421-xo1qjrqookfnzj5n
defects from mp will also be considered when using bugresolver.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
    def run(self, command, target, source, proposal):
25
25
        """Mark bugs fixed in the bug tracker."""
26
 
        fixed_bugs = target.fixed_bugs
27
 
        if not fixed_bugs:
 
26
        fixed_bugs = set()
 
27
 
 
28
        # Add bugs mentioned in bzr commit --fixes flag
 
29
        if target.fixed_bugs:
 
30
            fixed_bugs.update(target.fixed_bugs)
 
31
 
 
32
        # Also add in bugs linked to the MP from the source branch
 
33
        if hasattr(source, "lp_branch"):
 
34
            fixed_bugs.update([bug for bug in source.lp_branch.linked_bugs])
 
35
 
 
36
        if len(fixed_bugs) == 0:
28
37
            return
29
38
 
30
39
        project = target.lp_branch.project