Rev 2861: (robertc) Trivial update for bundle v4 serializers install method to use write groups. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Sep 25 09:36:53 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2861
revision-id: pqm at pqm.ubuntu.com-20070925083651-rthie4089wg1wf6o
parent: pqm at pqm.ubuntu.com-20070925080109-vqlnacer5iwwmxm8
parent: robertc at robertcollins.net-20070925070807-5chbtkqectn8exun
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-09-25 09:36:51 +0100
message:
  (robertc) Trivial update for bundle v4 serializers install method to use write groups. (Robert Collins)
modified:
  bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
    ------------------------------------------------------------
    revno: 2856.1.2
    merged: robertc at robertcollins.net-20070925070807-5chbtkqectn8exun
    parent: robertc at robertcollins.net-20070925030942-dt0leks0l5j34r0n
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: bundle
    timestamp: Tue 2007-09-25 17:08:07 +1000
    message:
      Review feedback.
    ------------------------------------------------------------
    revno: 2856.1.1
    merged: robertc at robertcollins.net-20070925030942-dt0leks0l5j34r0n
    parent: pqm at pqm.ubuntu.com-20070925020712-sf3qg1j3wh0l0hz8
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: bundle
    timestamp: Tue 2007-09-25 13:09:42 +1000
    message:
      (robertc) Trivial update for bundle v4 serializers install method to use write groups. (Robert Collins)
=== modified file 'bzrlib/bundle/serializer/v4.py'
--- a/bzrlib/bundle/serializer/v4.py	2007-08-17 00:53:48 +0000
+++ b/bzrlib/bundle/serializer/v4.py	2007-09-25 07:08:07 +0000
@@ -466,7 +466,20 @@
         self._info = None
 
     def install(self):
-        """Perform the installation"""
+        """Perform the installation.
+        
+        Must be called with the Repository locked.
+        """
+        self._repository.start_write_group()
+        try:
+            result = self._install_in_write_group()
+        except:
+            self._repository.abort_write_group()
+            raise
+        self._repository.commit_write_group()
+        return result
+
+    def _install_in_write_group(self):
         current_file = None
         current_versionedfile = None
         pending_file_records = []




More information about the bazaar-commits mailing list