/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/upload/cmds.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:
503
503
             directory)
504
504
 
505
505
        if wt:
506
 
            wt.lock_read()
507
506
            locked = wt
508
507
        else:
509
 
            branch.lock_read()
510
508
            locked = branch
511
 
        try:
 
509
        with locked.lock_read():
512
510
            if wt:
513
511
                changes = wt.changes_from(wt.basis_tree())
514
512
 
566
564
                uploader.upload_full_tree()
567
565
            else:
568
566
                uploader.upload_tree()
569
 
        finally:
570
 
            locked.unlock()
571
567
 
572
568
        # We uploaded successfully, remember it
573
569
        with branch.lock_write():