'bzr reconcile' unsafe for stacked 2a? (ignores parent inventories)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Compare GCCHKPacker and GCCHKReconcileP
def _copy_inventory
source_vf, target_vf = self._build_
# It is not sufficient to just use self.revision_keys, as stacked
# repositories can have more inventories than they have revisions.
# One alternative would be to do something with
# get_parent_
# than this.
if missing_
raise ValueError('We are missing inventories for revisions: %s'
% (missing_
vs.
def _copy_inventory
source_vf, target_vf = self._build_
if source_vf.keys() != self.revision_keys:
Off the top of my head I'd expect the missing_inventories logic is just as necessary in the reconcile case, so at a glance it looks like 'bzr reconcile' on a stacked repository could discard parent inventories, leading to the old 'AbsentContentF
(If my understanding is wrong then I'd say there's still a bug: that the code needs a comment that explains why it is reasonable for these two implementations of _copy_inventory
I'll propose a branch making what I think is the obvious fix for discussion. I haven't written a test yet because the scenario seems pretty fiddly to create, but perhaps it's easier than it looks.
Related branches
- bzr-core: Pending requested
-
Diff: 21 lines (+2/-3)1 file modifiedbzrlib/repofmt/groupcompress_repo.py (+2/-3)
tags: | added: check-for-breezy |