[MERGE][1.6][bug #259275] Disable automatic stacking via Bzrdir control.conf

John Arbash Meinel john at arbash-meinel.com
Tue Aug 19 22:04:47 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So it turns out that the default stacking policy code has bad interactions
with the rest of the system. So to get 1.6 out the door I'm disabling it.

The specific issue is that Launchpad wants to make it so that people doing
"bzr push lp:..." can get automatic stacking. Which is an admirable goal. The
*problem* is how automatic stacking interacts with branches that don't support it.

There is also an issue with "bzr branch" versus "bzr push". (Using
BzrDir.sprout() and BzrDir.clone() respectively.)

The current state is that if you set "default_stack_on=True" in a containing
directory, doing:

  bzr branch subdir otherdir

Will automatically upgrade your branch and repository to 1.6 format, and stack.

If you do:

  cd subdir
  bzr push ../otherdir

It will automatically upgrade your repository format, but not the branch
format. This actually causes things to break spectacularly. Because the
repository thinks it is stacked, and thus doesn't copy the revisions, but the
branch config is told to stack, but the branch format doesn't know anything
about it.

This happens because Martin fixed .sprout() to automatically upgrade the
branch format, but didn't fix .clone().

However, I don't think we want people doing "bzr push lp:" to automatically
have their branches and repositories upgraded to the latest format.

IMO, the appropriate fix is to have the "default_stack_on" config variable
only respected when the source branch format supports it. And have this be
true for both .sprout() and .clone().

If the user explicitly supplies the '--stacked' flag, they can somewhat expect
it will upgrade their branch.

Also, one could argue that LP shouldn't be telling the user to stack unless a
project has decided it wants that feature. However, it is a really nice use
case if we can get auto-stacking to work well (as 'bzr push lp:' becomes
vastly better)
So for now, I'm just reverting the ability to detect the automatic stacking
policy in the target. And I'll reject the changes when I merge that back into
bzr.dev.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIqzVvJdeBCYSNAAMRAlVsAJ4qbo7nsVYk5V+e4nXoislVsTHoNQCffAeo
qDFDhsJdpxDNKkxm8cwXJno=
=QXaa
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable_stacking_policy.patch
Type: text/x-diff
Size: 10115 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080819/209952e9/attachment-0001.bin 


More information about the bazaar mailing list