Packing a stacked branch removes parent inventories (in --2a)
Bug #412198 reported by
John A Meinel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Critical
|
John A Meinel |
Bug Description
As part of investigating bug #402778 and bug #393677 I came across this fact.
The "GCPacker" code explicitly copies a given set of revisions (either by passing in the revision keys, or by looking at source.
This breaks stacking invariants when the stacked-on branch is packed, because it *doesn't* copy across the parent inventories that we so carefully uploaded.
Related branches
lp:~jameinel/bzr/1.19-bug-402778
- Robert Collins (community): Approve
- Diff: 351 lines
summary: |
- Packing a stacked branch removes parent inventories + Packing a stacked branch removes parent inventories (in --2a) |
Changed in bzr: | |
status: | In Progress → Fix Committed |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
So as I did deeper, it looks like things get worse.
1) As near as I can tell, packing for *all* formats removes basis inventories. See this text in pack_repo. Packer. _copy_inventory _texts: _texts( self):
def _copy_inventory
...
# select inventory keys
inv_keys = self._revision_keys # currently the same keyspace, and note that
# querying for keys here could introduce a bug where an inventory item
# is missed, so do not change it to query separately without cross
# checking like the text key check below.
2) We only notice on --2a targets because of this: _format. pack_compresses :
self. target. pack(hint= hints)
if hints and self.target.
Since only --2a considers "self.target. _format. pack_compresses " we only run pack with the hints in the case of 2a repositories.
However, the next autopack or someone running "bzr pack" on a stacked branch *will* cause the loss of parent inventory texts and that *will* cause problem interacting with streaming over bzr+ssh.