[merge][#288751] avoid creating text deltas spanning repository stacks

Martin Pool mbp at canonical.com
Fri Nov 14 08:19:00 GMT 2008


This patch fixes a bug which causes some trouble with
stacked repositories.  The design was that text deltas would
not span repository stacks, for the sake of robustness, and
so that we can upgrade the inventory representation in
underlying repositories without causing trouble to the
stacked repository.  However, this was not checked properly.

The KnitPackRepository was previously trying to enforce this
constraint, but it didn't cover all paths, and it only
checked on file texts not on inventories.

This adds has_key(key) to some index(like) objects.  I
realize we don't generally want people checking for one key
at a time, but in some cases that's all the caller
reasonably has, and it's better than making them repeat
boilerplate to use get_parent_map.

There are some effort tests for stacking that I updated.
I'm glad they're there.  I do a bit more or less work in
some cases; I think it's still reasonable.

If this is merged well before 1.10 I think it would be worth putting
into a 1.9.1 release.

This won't automatically repack existing repositories (unless I'm
really lucky :-)

--
Martin <http://launchpad.net/~mbp/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20081114-288751-stacking-deltas.diff
Type: text/x-diff
Size: 36287 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081114/9464e14e/attachment-0001.bin 


More information about the bazaar mailing list