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

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from __future__ import absolute_import
18
18
 
19
 
from . import cleanup
 
19
import contextlib
 
20
 
20
21
from .branch import Branch
21
22
from .trace import note
22
23
from .errors import NoSuchRevision, BzrCommandError
43
44
 
44
45
    def run(self):
45
46
        lock_other = self.this_branch.base != self.other_branch.base
46
 
        with cleanup.ExitStack() as exit_stack:
 
47
        with contextlib.ExitStack() as exit_stack:
47
48
            exit_stack.enter_context(self.this_branch.lock_write())
48
49
            if lock_other:
49
50
                exit_stack.enter_context(self.other_branch.lock_read())