Merge lp:~spiv/bzr/hpss-diff-locking-bug into lp:bzr/2.0
Proposed by
Andrew Bennetts
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~spiv/bzr/hpss-diff-locking-bug |
Merge into: | lp:bzr/2.0 |
Diff against target: |
55 lines 3 files modified
NEWS (+3/-0) bzrlib/remote.py (+1/-0) bzrlib/tests/test_remote.py (+20/-0) |
To merge this branch: | bzr merge lp:~spiv/bzr/hpss-diff-locking-bug |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Approve | ||
Review via email: mp+12965@code.launchpad.net |
To post a comment you must log in.
This fixes bug 389413. Various code paths assume that Branch.get_rev_id will implicitly lock_read the branch (and repository), but RemoteBranch's get_rev_id didn't have the @needs_read_lock decorator. So this branch fixes that, and adds a test about it. The sneaky part is that RemoteBranch would get away with it if the server is new enough, which is probably why the existing test suite didn't catch this.
Also, it's not so great that callers such as revisionspec.py expect get_rev_id to acquire a read lock for them, as we are almost certainly wasting some effort, but fixing the performance is separate to fixing the correctness. (And fixing the performance is considerable knottier.)
I think this fix is a good candidate for the 2.0 branch.