Merge lp:~vila/bzr/config-lock-branch into lp:bzr
Proposed by
Vincent Ladeuil
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5942 |
Proposed branch: | lp:~vila/bzr/config-lock-branch |
Merge into: | lp:bzr |
Prerequisite: | lp:~vila/bzr/config-locks |
Diff against target: |
90 lines (+29/-8) 2 files modified
bzrlib/config.py (+19/-4) bzrlib/tests/test_config.py (+10/-4) |
To merge this branch: | bzr merge lp:~vila/bzr/config-lock-branch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Bennetts | Needs Fixing | ||
Review via email: mp+61466@code.launchpad.net |
Commit message
Implement branch config locking.
Description of the change
This properly implements BranchStore locking by delegating to the associated Branch object.
Note that it takes care of not creating a ref cycle. This is not triggered today but I prefer to handle it now that I realise it.
I remove some assertions in the tests that were peaking under the covers about the lock implementation but didn't provide more checks.
To post a comment you must log in.
This appears to be in a broken state:
29 + self.branch = weakref.ref(branch) lock_write( token)
30 +
31 + def lock_write(self, token=None):
32 + return self.branch.
Surely that has to be “self.branch( ).lock_ write(token) ”? Does this branch pass tests?