Rev 6411: Store load is lazy and will happen when needed in file:///home/vila/src/bzr/experimental/single-read-write/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Jan 4 15:18:00 UTC 2012
At file:///home/vila/src/bzr/experimental/single-read-write/
------------------------------------------------------------
revno: 6411
revision-id: v.ladeuil+lp at free.fr-20120104151800-ijjpsxujy8ant3sa
parent: v.ladeuil+lp at free.fr-20120102083700-aloy38w67hwwyyp3
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: single-read-write
timestamp: Wed 2012-01-04 16:18:00 +0100
message:
Store load is lazy and will happen when needed
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2012-01-02 08:37:00 +0000
+++ b/bzrlib/config.py 2012-01-04 15:18:00 +0000
@@ -3014,12 +3014,10 @@
Dirty sections are MutableSection which kept track of the value they
are expected to update.
"""
- # Get an up-to-date version from the persistent storage
+ # We need an up-to-date version from the persistent storage, unload the
+ # store. The reload will occur when needed (triggered by the first
+ # get_mutable_section() call below.
self.unload()
- # From now on we need a lock on the store to ensure changes can be
- # saved atomically (daughter classes will provide locking around
- # save_changes)
- self.load()
# Apply the changes from the preserved dirty sections
for dirty in dirty_sections:
clean = self.get_mutable_section(dirty.id)
More information about the bazaar-commits
mailing list