Rev 4464: Change CHK already-packed check to be generic using the pack_compresses flag. in http://people.ubuntu.com/~robertc/baz2.0/pending/autopack-cross-format-fetch
Robert Collins
robertc at robertcollins.net
Fri Jun 19 05:26:05 BST 2009
At http://people.ubuntu.com/~robertc/baz2.0/pending/autopack-cross-format-fetch
------------------------------------------------------------
revno: 4464
revision-id: robertc at robertcollins.net-20090619042602-dicz171b8vhj1s71
parent: robertc at robertcollins.net-20090619041922-acr6p23jah4z2gc8
committer: Robert Collins <robertc at robertcollins.net>
branch nick: autopack-cross-format-fetch
timestamp: Fri 2009-06-19 14:26:02 +1000
message:
Change CHK already-packed check to be generic using the pack_compresses flag.
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py 2009-06-19 04:19:22 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py 2009-06-19 04:26:02 +0000
@@ -558,11 +558,6 @@
pack_factory = GCPack
resumed_pack_factory = ResumedGCPack
- def _already_packed(self):
- """Is the collection already packed?"""
- # Always repack GC repositories for now
- return False
-
def _execute_pack_operations(self, pack_operations,
_packer_class=GCCHKPacker,
reload_func=None):
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2009-06-17 17:57:15 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2009-06-19 04:26:02 +0000
@@ -1554,7 +1554,7 @@
def _already_packed(self):
"""Is the collection already packed?"""
- return len(self._names) < 2
+ return not (self.repo._format.pack_compresses or (len(self._names) > 1))
def pack(self):
"""Pack the pack collection totally."""
More information about the bazaar-commits
mailing list