[MERGE][#291046] Fix pushing an unstackable branch + stackable repo when there is a default stacking policy.

Andrew Bennetts andrew.bennetts at canonical.com
Wed Dec 17 21:59:07 GMT 2008


John Arbash Meinel wrote:
[...]
> >> So I'd like a test dealing with a KnitPack6 format repository that shows
> >> that it preserves the repository format as long as it supports stacking
> >> already.
> > 
> > I've added the test, and it passes with no code changes.  It works already
> > because by the time require_stacking() is called in this case the new
> > repository has already been made (preserving the source format), so the
> > repository format override doesn't matter.
> > 
> > -Andrew.
> 
> I'm a bit concerned that it is a problem waiting to happen. Though I
> suppose that as long as we have a test for it, if some refactoring does
> bring it to a location where it breaks, we should know about it.

Right, my thoughts exactly.

I think probably the code should be significantly restructured so that it
e.g. decides on all the formats it will create before it actually writes
anything to the target.  I don't feel like tackling that problem right now
though, but so long as we have tests for the behaviour we want we can safely
improve the implementation at our leisure.

-Andrew.




More information about the bazaar mailing list