~abentley/bzr-pqm/child_pqm_email

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-14 10:48:03 UTC
  • Revision ID: andrew.bennetts@canonical.com-20100414104803-apcj0yq9mh7wkpha
Only read-lock the branch once in cmd_pqm_submit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
                location = '.'
100
100
            tree, b, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(
101
101
                location)
 
102
            if b is not None:
 
103
                b.lock_read()
 
104
                self.add_cleanup(b.unlock)
102
105
        if relpath and not tree and location != '.':
103
106
            raise errors.BzrCommandError(
104
107
                'No working tree was found, but we were not given the '