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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-07-25 03:06:42 UTC
  • mfrom: (7045.3.4 python3-r)
  • Revision ID: breezy.the.bot@gmail.com-20180725030642-oghhedvui3470wy6
Fix another ~500 tests on Python 3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-r/+merge/350430

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    if to_file is None:
130
130
        to_file = sys.stdout
131
131
 
132
 
    wt.lock_read()
133
 
    try:
 
132
    with wt.lock_read():
134
133
        new_is_working_tree = True
135
134
        if revision is None:
136
135
            if wt.last_revision() != wt.branch.last_revision():
150
149
                    raise errors.BzrCommandError(str(e))
151
150
            else:
152
151
                new = wt
153
 
        old.lock_read()
154
 
        new.lock_read()
155
 
        try:
 
152
        with old.lock_read(), new.lock_read():
156
153
            for hook in hooks['pre_status']:
157
154
                hook(StatusHookParams(old, new, to_file, versioned,
158
155
                    show_ids, short, verbose, specific_files=specific_files))
220
217
            for hook in hooks['post_status']:
221
218
                hook(StatusHookParams(old, new, to_file, versioned,
222
219
                    show_ids, short, verbose, specific_files=specific_files))
223
 
        finally:
224
 
            old.unlock()
225
 
            new.unlock()
226
 
    finally:
227
 
        wt.unlock()
228
220
 
229
221
 
230
222
def _get_sorted_revisions(tip_revision, revision_ids, parent_map):