Merge lp:~spiv/bzr/stacked-2a-reconcile into lp:bzr

Proposed by Andrew Bennetts
Status: Work in progress
Proposed branch: lp:~spiv/bzr/stacked-2a-reconcile
Merge into: lp:bzr
Diff against target: 21 lines (+2/-3)
1 file modified
bzrlib/repofmt/groupcompress_repo.py (+2/-3)
To merge this branch: bzr merge lp:~spiv/bzr/stacked-2a-reconcile
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+32074@code.launchpad.net

Description of the change

See description of bug 615236; GCCHKPacker got fixed at some point to take parent inventories for stacking into account, but the GCCHKReconcilePacker didn't get a corresponding change. This patch makes them share the relevant code.

Probably this should have a test before merging, but I'd like to get feedback on whether my understanding of the code is correct, if anyone knows :)

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Looks sane offhand.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Considering Robert's comment as addressing your feedback query, I'll mark this as WIP waiting for your test :)

Unmerged revisions

5375. By Andrew Bennetts

Reuse GCCHKPacker's _copy_inventory_texts in GCCHKReconcilePacker, including missing_inventories logic.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
2--- bzrlib/repofmt/groupcompress_repo.py 2010-05-14 13:25:05 +0000
3+++ bzrlib/repofmt/groupcompress_repo.py 2010-08-09 08:52:44 +0000
4@@ -424,6 +424,7 @@
5 % (missing_inventories,))
6 self._copy_stream(source_vf, target_vf, inventory_keys,
7 'inventories', self._get_filtered_inv_stream, 2)
8+ return source_vf
9
10 def _copy_chk_texts(self):
11 source_vf, target_vf = self._build_vfs('chk', False, False)
12@@ -506,9 +507,7 @@
13 self._gather_text_refs = True
14
15 def _copy_inventory_texts(self):
16- source_vf, target_vf = self._build_vfs('inventory', True, True)
17- self._copy_stream(source_vf, target_vf, self.revision_keys,
18- 'inventories', self._get_filtered_inv_stream, 2)
19+ source_vf = super(GCCHKReconcilePacker, self)._copy_inventory_texts()
20 if source_vf.keys() != self.revision_keys:
21 self._data_changed = True
22