Merge lp:~spiv/bzr/log-objectnotlocked-bug-445171 into lp:bzr/2.0
Proposed by
Andrew Bennetts
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~spiv/bzr/log-objectnotlocked-bug-445171 |
Merge into: | lp:bzr/2.0 |
Diff against target: |
208 lines 5 files modified
NEWS (+6/-0) bzrlib/builtins.py (+54/-47) bzrlib/log.py (+2/-0) bzrlib/merge_directive.py (+4/-2) bzrlib/tests/__init__.py (+4/-0) |
To merge this branch: | bzr merge lp:~spiv/bzr/log-objectnotlocked-bug-445171 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email: mp+14135@code.launchpad.net |
To post a comment you must log in.
This fixes ObjectNotLocked errors during actions like "bzr log -r 199 NEWS" in a branch of lp:bzr. The basic change is pretty simple: acquire the read_lock as soon as cmd_log acquires the branch, and hold it until the end of cmd_log. This case was supposedly already tested by blackbox tests, but because of the global chk_map page cache the bug wasn't being exposed. So this patch also adjusts TestCase. _run_bzr_ core to clear that global cache. We should perhaps look at what it would take to make that cache truly semantically transparent, e.g. always require a read lock even if the page is in the cache.
This also has the benefit that "bzr -Drelock log ..." is clean now :)