Rev 2702: Fix committing of merges. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Fri Aug 3 04:49:37 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2702
revision-id: robertc at robertcollins.net-20070803034933-wtol46z6u16twzzl
parent: robertc at robertcollins.net-20070803032511-9gh17uoxw44z4izj
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Fri 2007-08-03 13:49:33 +1000
message:
  Fix committing of merges.
modified:
  bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py	2007-08-02 11:45:09 +0000
+++ b/bzrlib/repofmt/knitrepo.py	2007-08-03 03:49:33 +0000
@@ -729,11 +729,12 @@
         # been updated enough to understand that, so we have a regular 2-list
         # index giving parents and compression source.
         self.repo._inv_write_index = InMemoryGraphIndex(reference_lists=2)
-        # we require that inv 'knits' be accessed from within the write 
-        # group to be able to be written to, simply because it makes this
-        # code cleaner - we don't need to track all 'open' knits and 
-        # adjust them. As the inventory knit is neither precious, nor the
-        # regular interface for data access, this seems sufficient.
+        # if we have created an inventory index, add the new write index to it
+        if getattr(self.repo, '_inv_all_indices', None) is not None:
+            self.repo._inv_all_indices.insert_index(0, self.repo._inv_write_index)
+            # we don't bother updating the knit layer, because there is not
+            # defined interface for adding inventories that should need the 
+            # existing knit to be changed - its all behind 'repo.add_inventory'.
 
 
 class GraphKnitRepository1(KnitRepository):



More information about the bazaar-commits mailing list