~james-w/tarmac/utf8

« back to all changes in this revision

Viewing changes to tarmac/bin/commands.py

  • Committer: James Westby
  • Date: 2013-01-24 20:59:23 UTC
  • mto: (394.2.12 setsid)
  • mto: This revision was merged to the branch mainline in revision 418.
  • Revision ID: james.westby@canonical.com-20130124205923-ta1tkbwntcpv61fl
Use properties to get the branch and tree, rather than assigning at instaniation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
                    source = Branch.create(
211
211
                        proposal.source_branch, self.config, target=target)
212
212
 
213
 
                    approved = source.bzr_branch.revision_id_to_revno(
 
213
                    source_bzr_branch = source.get_bzr_branch()
 
214
                    approved = source_bzr_branch.revision_id_to_revno(
214
215
                        str(proposal.reviewed_revid))
215
 
                    tip = source.bzr_branch.revno()
 
216
                    tip = source_bzr_branch.revno()
216
217
 
217
218
                    if tip > approved:
218
219
                        message = u'Unapproved changes made after approval'
276
277
                commit_message = proposal.commit_message
277
278
                if commit_message is None and self.config.imply_commit_message:
278
279
                    commit_message = proposal.description
 
280
 
279
281
                target.commit(commit_message,
280
 
                             revprops=revprops,
281
 
                             authors=source.authors,
282
 
                             reviews=self._get_reviews(proposal))
 
282
                              revprops=revprops,
 
283
                              authors=source.authors,
 
284
                              reviews=self._get_reviews(proposal))
283
285
 
284
286
                self.logger.debug('Firing tarmac_post_commit hook')
285
287
                tarmac_hooks.fire('tarmac_post_commit',