~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/model/branchmergeproposaljob.py

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
from canonical.config import config
63
63
from canonical.database.enumcol import EnumCol
64
 
from lp.services.messages.model.message import (
65
 
    MessageJob,
66
 
    MessageJobAction,
67
 
    )
68
 
from lp.services.messages.interfaces.message import IMessageJob
69
64
from canonical.launchpad.webapp import errorlog
70
65
from canonical.launchpad.webapp.interaction import setupInteraction
71
66
from canonical.launchpad.webapp.interfaces import (
75
70
    MAIN_STORE,
76
71
    MASTER_FLAVOR,
77
72
    )
 
73
from lp.code.adapters.branch import BranchMergeProposalDelta
78
74
from lp.code.enums import BranchType
79
75
from lp.code.interfaces.branchmergeproposal import (
80
76
    IBranchMergeProposalJob,
105
101
    get_rw_server,
106
102
    )
107
103
from lp.registry.interfaces.person import IPersonSet
 
104
from lp.services.database.stormbase import StormBase
108
105
from lp.services.job.interfaces.job import JobStatus
109
106
from lp.services.job.model.job import Job
110
107
from lp.services.job.runner import (
112
109
    BaseRunnableJobSource,
113
110
    )
114
111
from lp.services.mail.sendmail import format_address_for_person
115
 
from lp.services.database.stormbase import StormBase
 
112
from lp.services.messages.interfaces.message import IMessageJob
 
113
from lp.services.messages.model.message import (
 
114
    MessageJob,
 
115
    MessageJobAction,
 
116
    )
116
117
 
117
118
 
118
119
class BranchMergeProposalJobType(DBEnumeratedType):
376
377
        self.checkReady()
377
378
        preview = PreviewDiff.fromBranchMergeProposal(
378
379
            self.branch_merge_proposal)
379
 
        self.branch_merge_proposal.preview_diff = preview
 
380
        with BranchMergeProposalDelta.monitor(
 
381
            self.branch_merge_proposal):
 
382
            self.branch_merge_proposal.preview_diff = preview
380
383
 
381
384
    def getOperationDescription(self):
382
385
        return ('generating the diff for a merge proposal')