/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/weave_fmt/workingtree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-07-27 23:53:10 UTC
  • mfrom: (7356.1.10 exitstack)
  • Revision ID: breezy.the.bot@gmail.com-20190727235310-ccs69jhu4pq55qsi
Use contextlib.ExitStack rather than our homegrown OperationWithCleanups.

Merged from https://code.launchpad.net/~jelmer/brz/exitstack/+merge/369203

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
            branch = a_controldir.open_branch()
98
98
        if revision_id is None:
99
99
            revision_id = _mod_revision.ensure_null(branch.last_revision())
100
 
        branch.lock_write()
101
 
        try:
 
100
        with branch.lock_write():
102
101
            branch.generate_revision_history(revision_id)
103
 
        finally:
104
 
            branch.unlock()
105
102
        inv = inventory.Inventory()
106
103
        wt = WorkingTree2(a_controldir.root_transport.local_abspath('.'),
107
104
                          branch,