Rev 2792: Unbreak weaves. in http://people.ubuntu.com/~robertc/baz2.0/commit

Robert Collins robertc at robertcollins.net
Fri Sep 14 01:08:55 BST 2007


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

------------------------------------------------------------
revno: 2792
revision-id: robertc at robertcollins.net-20070914000845-qac6s3w4xj41ivmh
parent: robertc at robertcollins.net-20070913032229-vdojubs6akxlk4ao
committer: Robert Collins <robertc at robertcollins.net>
branch nick: commit
timestamp: Fri 2007-09-14 10:08:45 +1000
message:
  Unbreak weaves.
modified:
  bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
  bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
=== modified file 'bzrlib/repofmt/weaverepo.py'
--- a/bzrlib/repofmt/weaverepo.py	2007-09-09 22:01:56 +0000
+++ b/bzrlib/repofmt/weaverepo.py	2007-09-14 00:08:45 +0000
@@ -412,11 +412,12 @@
 class WeaveCommitBuilder(CommitBuilder):
     """A builder for weave based repos that don't support ghosts."""
 
-    def _add_text_to_weave(self, file_id, new_lines, parents):
+    def _add_text_to_weave(self, file_id, new_lines, parents, nostore_sha):
         versionedfile = self.repository.weave_store.get_weave_or_empty(
             file_id, self.repository.get_transaction())
         result = versionedfile.add_lines(
-            self._new_revision_id, parents, new_lines)[0:2]
+            self._new_revision_id, parents, new_lines,
+            nostore_sha=nostore_sha)[0:2]
         versionedfile.clear_cache()
         return result
 

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2007-09-13 03:22:29 +0000
+++ b/bzrlib/repository.py	2007-09-14 00:08:45 +0000
@@ -2385,7 +2385,7 @@
         # not a guarantee of safety. What would be better is always checking
         # the content during test suite execution. RBC 20070912
         try:
-            return versionedfile.add_lines(
+            return versionedfile.add_lines_with_ghosts(
                 self._new_revision_id, parents, new_lines,
                 nostore_sha=nostore_sha, random_id=self.random_revid,
                 check_content=False)[0:2]

=== modified file 'bzrlib/tests/interrepository_implementations/test_interrepository.py'
--- a/bzrlib/tests/interrepository_implementations/test_interrepository.py	2007-09-12 03:16:04 +0000
+++ b/bzrlib/tests/interrepository_implementations/test_interrepository.py	2007-09-14 00:08:45 +0000
@@ -300,7 +300,8 @@
             committer="Foo Bar <foo at example.com>",
             revision_id='ghost')
         ie = bzrlib.inventory.InventoryDirectory('TREE_ROOT', '', None)
-        builder.record_entry_contents(ie, [], '', None)
+        builder.record_entry_contents(ie, [], '', None,
+            ('directory', None, None, None))
         builder.finish_inventory()
         builder.commit("Message")
         repo.unlock()



More information about the bazaar-commits mailing list