Rev 2745: RevisionInstaller now creates a write group for its work in http://sourcefrog.net/bzr/pack-repository
Martin Pool
mbp at sourcefrog.net
Tue Aug 28 09:17:12 BST 2007
At http://sourcefrog.net/bzr/pack-repository
------------------------------------------------------------
revno: 2745
revision-id: mbp at sourcefrog.net-20070828081705-xej6l2h4wpp3fyi2
parent: robertc at robertcollins.net-20070828021813-4p3w6xklwghhzwg9
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: pack-repository
timestamp: Tue 2007-08-28 18:17:05 +1000
message:
RevisionInstaller now creates a write group for its work
modified:
bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
=== 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-08-28 08:17:05 +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_group()
+ except:
+ self._repository.abort_write_group()
+ raise
+ self._repository.commit_write_group()
+ return result
+
+ def _install_in_group(self):
current_file = None
current_versionedfile = None
pending_file_records = []
More information about the bazaar-commits
mailing list