/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 breezy/plugins/launchpad/lp_api.py

  • Committer: Jelmer Vernooij
  • Date: 2017-08-29 21:29:35 UTC
  • mfrom: (6754.8.21 lock-context-2)
  • mto: This revision was merged to the branch mainline in revision 6784.
  • Revision ID: jelmer@jelmer.uk-20170829212935-lakl2jhq9sqckejp
Merge lock-context-2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
        """Update the Launchpad copy of this branch."""
267
267
        if not self._check_update:
268
268
            return
269
 
        self.bzr.lock_read()
270
 
        try:
 
269
        with self.bzr.lock_read():
271
270
            if self.lp.last_scanned_id is not None:
272
271
                if self.bzr.last_revision() == self.lp.last_scanned_id:
273
272
                    trace.note(gettext('%s is already up-to-date.') %
279
278
                    raise errors.DivergedBranches(self.bzr, self.push_bzr)
280
279
                trace.note(gettext('Pushing to %s') % self.lp.bzr_identity)
281
280
            self.bzr.push(self.push_bzr)
282
 
        finally:
283
 
            self.bzr.unlock()
284
281
 
285
282
    def find_lca_tree(self, other):
286
283
        """Find the revision tree for the LCA of this branch and other.