Rev 3496: Hack in a way to not extract unused parent texts. in http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/annotation_policy_cmd

John Arbash Meinel john at arbash-meinel.com
Wed Jun 18 04:50:32 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/annotation_policy_cmd

------------------------------------------------------------
revno: 3496
revision-id: john at arbash-meinel.com-20080618035013-ctycu08o20aj79gk
parent: john at arbash-meinel.com-20080617213451-h2d53vmh54uxrxkc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: annotation_policy_cmd
timestamp: Tue 2008-06-17 22:50:13 -0500
message:
  Hack in a way to not extract unused parent texts.
-------------- next part --------------
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2008-06-12 16:34:26 +0000
+++ b/bzrlib/knit.py	2008-06-18 03:50:13 +0000
@@ -3187,6 +3187,9 @@
         if revision_id in self._annotated_lines:
             # Nothing to do
             return []
+        multiparent = True
+        if self.policy == 'no-merge':
+            multiparent = False
         pending = set([revision_id])
         records = []
         generation = 0
@@ -3202,6 +3205,12 @@
             for rev_id, details in build_details.iteritems():
                 (index_memo, compression_parent, parents,
                  record_details) = details
+                if not multiparent:
+                    # If we don't want to extract multiple parents, clean up
+                    # the pending parent list, and fix up details
+                    parents = parents[:1]
+                    details = (index_memo, compression_parent, parents,
+                               record_details)
                 self._revision_id_graph[rev_id] = parents
                 records.append((rev_id, index_memo))
                 # Do we actually need to check _annotated_lines?



More information about the bazaar-commits mailing list