Rev 6419: Hmpf, branch.unlock() will call store.save_changes(), this should be called explicitly or no IOs are saved. in file:///home/vila/src/bzr/experimental/cached-branch-store/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Jan 18 16:51:29 UTC 2012


At file:///home/vila/src/bzr/experimental/cached-branch-store/

------------------------------------------------------------
revno: 6419
revision-id: v.ladeuil+lp at free.fr-20120118165129-0vwe5duqy4ct7rhc
parent: v.ladeuil+lp at free.fr-20120118141345-dqma73nd5jxx8yj6
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cached-branch-store
timestamp: Wed 2012-01-18 17:51:29 +0100
message:
  Hmpf, branch.unlock() will call store.save_changes(), this should be called explicitly or no IOs are saved. 
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2012-01-18 14:13:45 +0000
+++ b/bzrlib/config.py	2012-01-18 16:51:29 +0000
@@ -3873,14 +3873,14 @@
     @needs_write_lock
     def set(self, name, value):
         super(BranchStack, self).set(name, value)
-        # Force a write to persistent storage
-        self.store.save_changes()
+        # Unlocking the branch will trigger a store.save_changes() so the last
+        # unlock saves all the changes.
 
     @needs_write_lock
     def remove(self, name):
         super(BranchStack, self).remove(name)
-        # Force a write to persistent storage
-        self.store.save_changes()
+        # Unlocking the branch will trigger a store.save_changes() so the last
+        # unlock saves all the changes.
 
 
 class RemoteControlStack(_CompatibleStack):



More information about the bazaar-commits mailing list