/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-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
import contextlib
 
17
from __future__ import absolute_import
18
18
 
 
19
from . import cleanup
19
20
from .branch import Branch
20
21
from .trace import note
21
22
from .errors import NoSuchRevision, CommandError
42
43
 
43
44
    def run(self):
44
45
        lock_other = self.this_branch.base != self.other_branch.base
45
 
        with contextlib.ExitStack() as exit_stack:
 
46
        with cleanup.ExitStack() as exit_stack:
46
47
            exit_stack.enter_context(self.this_branch.lock_write())
47
48
            if lock_other:
48
49
                exit_stack.enter_context(self.other_branch.lock_read())