/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/send.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-26 20:58:23 UTC
  • mto: This revision was merged to the branch mainline in revision 7378.
  • Revision ID: jelmer@jelmer.uk-20190626205823-ms7j2rgjd8oj0g97
Use ExitStack in more places.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        from_, possible_transports=possible_transports)[:2]
47
47
    # we may need to write data into branch's repository to calculate
48
48
    # the data to send.
49
 
    branch.lock_write()
50
 
    try:
 
49
    with branch.lock_write():
51
50
        if output is None:
52
51
            config_stack = branch.get_config_stack()
53
52
            if mail_to is None:
158
157
                finally:
159
158
                    if outfile is not to_file:
160
159
                        outfile.close()
161
 
    finally:
162
 
        branch.unlock()
163
160
 
164
161
 
165
162
def _send_4(branch, revision_id, target_branch, public_branch,