Rev 4248: (vila) supports_chks flag on repo formats & log tuning in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Apr 3 16:14:51 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4248
revision-id: pqm at pqm.ubuntu.com-20090403151446-o35ylr3cst5ioejg
parent: pqm at pqm.ubuntu.com-20090403134832-h6hyqeruefueidyu
parent: v.ladeuil+lp at free.fr-20090403140411-lvs3pv99t7qk81mw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-04-03 16:14:46 +0100
message:
  (vila) supports_chks flag on repo formats & log tuning
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
  bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
  bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
    ------------------------------------------------------------
    revno: 4247.1.1
    revision-id: v.ladeuil+lp at free.fr-20090403140411-lvs3pv99t7qk81mw
    parent: pqm at pqm.ubuntu.com-20090403134832-h6hyqeruefueidyu
    parent: ian.clatworthy at canonical.com-20090403130827-5jjixcpd4yj2f3kz
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: trunk
    timestamp: Fri 2009-04-03 16:04:11 +0200
    message:
      supports_chks flag on repo formats & log tuning
    modified:
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
    ------------------------------------------------------------
    revno: 4246.2.1
    revision-id: ian.clatworthy at canonical.com-20090403130827-5jjixcpd4yj2f3kz
    parent: pqm at pqm.ubuntu.com-20090403112653-xcbrm6c5zdlymd53
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.bris-supports-chks
    timestamp: Fri 2009-04-03 23:08:27 +1000
    message:
      supports_chks flag on repo formats & log tuning
    modified:
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2009-04-01 21:59:09 +0000
+++ b/bzrlib/builtins.py	2009-04-03 13:08:27 +0000
@@ -2202,8 +2202,9 @@
             # evil when adding features", we continue to use the
             # original algorithm - per-file-graph - for the "single
             # file that isn't a directory without showing a delta" case.
+            partial_history = revision and b.repository._format.supports_chks
             match_using_deltas = (len(file_ids) != 1 or filter_by_dir
-                or delta_type)
+                or delta_type or partial_history)
 
             # Build the LogRequest and execute it
             if len(file_ids) == 0:

=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py	2009-03-24 01:53:42 +0000
+++ b/bzrlib/repofmt/knitrepo.py	2009-04-03 13:08:27 +0000
@@ -291,6 +291,8 @@
     supports_ghosts = True
     # External lookups are not supported in this format.
     supports_external_lookups = False
+    # No CHK support.
+    supports_chks = False
     _fetch_order = 'topological'
     _fetch_uses_deltas = True
     fast_deltas = False
@@ -379,6 +381,7 @@
         repo.signatures = self._get_signatures(repo_transport, repo)
         repo.inventories = self._get_inventories(repo_transport, repo)
         repo.texts = self._get_texts(repo_transport, repo)
+        repo.chk_bytes = None
         repo._transport = repo_transport
         return repo
 

=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2009-04-03 07:18:11 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2009-04-03 13:08:27 +0000
@@ -2071,6 +2071,7 @@
                 deltas=True, parents=True, is_locked=self.is_locked),
             data_access=self._pack_collection.text_index.data_access,
             max_delta_chain=200)
+        self.chk_bytes = None
         # True when the repository object is 'write locked' (as opposed to the
         # physical lock only taken out around changes to the pack-names list.)
         # Another way to represent this would be a decorator around the control
@@ -2278,6 +2279,8 @@
     supports_ghosts = True
     # External references are not supported in pack repositories yet.
     supports_external_lookups = False
+    # Most pack formats do not use chk lookups.
+    supports_chks = False
     # What index classes to use
     index_builder_class = None
     index_class = None

=== modified file 'bzrlib/repofmt/weaverepo.py'
--- a/bzrlib/repofmt/weaverepo.py	2009-03-25 04:20:12 +0000
+++ b/bzrlib/repofmt/weaverepo.py	2009-04-03 13:08:27 +0000
@@ -266,6 +266,7 @@
     supports_tree_reference = False
     supports_ghosts = False
     supports_external_lookups = False
+    supports_chks = False
     _fetch_order = 'topological'
     _fetch_reconcile = True
     fast_deltas = False
@@ -315,6 +316,7 @@
         result.signatures = self._get_signatures(repo_transport, result)
         result.inventories = self._get_inventories(repo_transport, result)
         result.texts = self._get_texts(repo_transport, result)
+        result.chk_bytes = None
         return result
 
     def check_conversion_target(self, target_format):
@@ -475,6 +477,8 @@
 
     _versionedfile_class = weave.WeaveFile
     supports_ghosts = False
+    supports_chks = False
+
     _fetch_order = 'topological'
     _fetch_reconcile = True
     fast_deltas = False
@@ -555,6 +559,7 @@
         result.signatures = self._get_signatures(repo_transport, result)
         result.inventories = self._get_inventories(repo_transport, result)
         result.texts = self._get_texts(repo_transport, result)
+        result.chk_bytes = None
         result._transport = repo_transport
         return result
 




More information about the bazaar-commits mailing list