~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/lp_propose.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    hooks = ProposeMergeHooks()
53
53
 
54
54
    def __init__(self, tree, source_branch, target_branch, message, reviews,
55
 
                 staging=False, approve=False):
 
55
                 staging=False, approve=False, fixes=None):
56
56
        """Constructor.
57
57
 
58
58
        :param tree: The working tree for the source branch.
90
90
                            for reviewer, review_type in
91
91
                            reviews]
92
92
        self.approve = approve
 
93
        self.fixes = fixes
93
94
 
94
95
    def get_comment(self, prerequisite_branch):
95
96
        """Determine the initial comment for the merge proposal."""
203
204
            review_types=review_types)
204
205
        if self.approve:
205
206
            self.call_webservice(mp.setStatus, status='Approved')
 
207
        if self.fixes:
 
208
            if self.fixes.startswith('lp:'):
 
209
                self.fixes = self.fixes[3:]
 
210
            self.call_webservice(
 
211
                self.source_branch.lp.linkBug,
 
212
                bug=self.launchpad.bugs[int(self.fixes)])
206
213
        webbrowser.open(lp_api.canonical_url(mp))
207
214
 
208
215