Rev 2749: Move common _abort_write_group to base class in http://sourcefrog.net/bzr/pack-hashes

Martin Pool mbp at sourcefrog.net
Thu Aug 30 01:10:53 BST 2007


At http://sourcefrog.net/bzr/pack-hashes

------------------------------------------------------------
revno: 2749
revision-id: mbp at sourcefrog.net-20070830001052-kd2efiji0664ihzz
parent: mbp at sourcefrog.net-20070830000846-p71qs5j6k2xkzri3
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: pack-hashes
timestamp: Thu 2007-08-30 10:10:52 +1000
message:
  Move common _abort_write_group to base class
modified:
  bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2007-08-30 00:08:46 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2007-08-30 00:10:52 +0000
@@ -1239,6 +1239,16 @@
         self._inv_thunk.setup()
         self._start_hash_index()
 
+    def _abort_write_group(self):
+        # FIXME: just drop the transient index.
+        self._revision_store.reset()
+        self.weave_store.reset()
+        self._inv_thunk.reset()
+        # forget what names there are
+        self._packs.reset()
+        self._open_pack_hash = None
+        self._abort_hash_index()
+
 
 class GraphKnitRepository1(_GraphKnitRepositoryBase, KnitRepository):
     """Experimental graph-knit using repository."""
@@ -1258,15 +1268,6 @@
         # for tests
         self._reconcile_does_inventory_gc = False
 
-    def _abort_write_group(self):
-        # FIXME: just drop the transient index.
-        self._revision_store.reset()
-        self.weave_store.reset()
-        self._inv_thunk.reset()
-        # forget what names there are
-        self._packs.reset()
-        self._open_pack_hash = None
-
     def _pack_tuple(self, name):
         """Return a tuple with the transport and file name for a pack name."""
         return self._pack_transport, name + '.pack'
@@ -1372,15 +1373,6 @@
         # for tests
         self._reconcile_does_inventory_gc = False
 
-    def _abort_write_group(self):
-        # FIXME: just drop the transient index.
-        self._revision_store.reset()
-        self.weave_store.reset()
-        self._inv_thunk.reset()
-        # forget what names there are
-        self._packs.reset()
-        self._open_pack_hash = None
-
     def _pack_tuple(self, name):
         """Return a tuple with the transport and file name for a pack name."""
         return self._pack_transport, name + '.pack'




More information about the bazaar-commits mailing list