Merge lp://qastaging/~vila/bzr/lockable-config-files into lp://qastaging/bzr
Proposed by
Vincent Ladeuil
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | John A Meinel | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5395 | ||||
Proposed branch: | lp://qastaging/~vila/bzr/lockable-config-files | ||||
Merge into: | lp://qastaging/bzr | ||||
Prerequisite: | lp://qastaging/~vila/bzr/simplify-test-config-building | ||||
Diff against target: |
864 lines (+375/-67) 8 files modified
NEWS (+14/-6) bzrlib/builtins.py (+27/-14) bzrlib/config.py (+105/-24) bzrlib/plugins/launchpad/test_account.py (+1/-1) bzrlib/tests/blackbox/test_break_lock.py (+24/-1) bzrlib/tests/test_commands.py (+1/-1) bzrlib/tests/test_config.py (+202/-19) bzrlib/tests/test_smtp_connection.py (+1/-1) |
||||
To merge this branch: | bzr merge lp://qastaging/~vila/bzr/lockable-config-files | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email: mp+33424@code.qastaging.launchpad.net |
Description of the change
This is the core thread of the loom regarding config files.
This fixes bug #525571 by using a real lock (the previous fix was reducing
the racing window by using a atomic file).
To post a comment you must log in.
305 + @classmethod
306 + def from_bytes(cls, unicode_bytes):
It seems a little weird to call it 'unicode_bytes' and to have the function be 'from_bytes'. What about 'from_unicode(cls, unicode_content)' ?
I also thought that 'lock_write' would take care of reload(), so that callers couldn't actually get it wrong. (reload whenever the lock transitions from 0 => 1 lockers.)
This seems ok enough to land, but it also seems like it could be improved.