/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 bzrlib/builtins.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-12 02:25:46 UTC
  • mto: This revision was merged to the branch mainline in revision 5147.
  • Revision ID: andrew.bennetts@canonical.com-20100412022546-20jyd6iux6wqqx70
Read-lock local_branch and remote_branch in cmd_missing as soon as they are opened.  Makes 'bzr missing' clean w.r.t. -Drelock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4346
4346
            restrict = 'remote'
4347
4347
 
4348
4348
        local_branch = Branch.open_containing(u".")[0]
 
4349
        local_branch.lock_read()
 
4350
        self.add_cleanup(local_branch.unlock)
 
4351
 
4349
4352
        parent = local_branch.get_parent()
4350
4353
        if other_branch is None:
4351
4354
            other_branch = parent
4360
4363
        remote_branch = Branch.open(other_branch)
4361
4364
        if remote_branch.base == local_branch.base:
4362
4365
            remote_branch = local_branch
 
4366
        else:
 
4367
            remote_branch.lock_read()
 
4368
            self.add_cleanup(remote_branch.unlock)
4363
4369
 
4364
 
        local_branch.lock_read()
4365
 
        self.add_cleanup(local_branch.unlock)
4366
4370
        local_revid_range = _revision_range_to_revid_range(
4367
4371
            _get_revision_range(my_revision, local_branch,
4368
4372
                self.name()))
4369
4373
 
4370
 
        remote_branch.lock_read()
4371
 
        self.add_cleanup(remote_branch.unlock)
4372
4374
        remote_revid_range = _revision_range_to_revid_range(
4373
4375
            _get_revision_range(revision,
4374
4376
                remote_branch, self.name()))