← Back to team overview

maria-developers team mailing list archive

IMPORTANT: merging and pushing to main Launchpad MariaDB trees.


As discussed in previous mails, I have now enabled the append_revisions_only
option in our main Launchpad trees:


This email describes how merging must now be done to avoid getting this error
when pushing:

    bzr: ERROR: Server sent an unexpected error: ('error', 'Operation denied because it would change the main history, which is not permitted by the append_revisions_only setting on branch "lp-139886317008592:///~maria-captains/maria/5.1".')

Suppose we have a local branch "mypatch" that we want to push to lp:maria. If
someone else pushed a change to lp:maria since mypatch was branched, we first
need to merge.

There are two ways to do the merge:

1. Merge from mypatch into lp:maria

2. Merge from lp:maria into mypatch

The result in terms of file contents will be the same, but the resulting
history will be different in that the primary and secondary merge parent will
be switched between the two cases.

The effect of the append_revisions_only option is to enforce method 1. Method
2 will now fail with the above error when trying to push the result.

This means that the proper procedure for merging before pushing is now as

  bzr branch lp:maria merge-5.1
  cd merge-5.1
  bzr merge ../mypatch
  bzr commit -m"Merged mypatch into trunk."
  # Compile and test
  bzr push lp:maria

The important thing here is that the `bzr merge` command is done inside a
clean clone of lp:maria, with no additional commits, and the branch with local
commits to be merged is specified as the location to merge.

Some additional points:

 - See my previous mails to maria-developers@ for more background information
   on this and why it is useful enough to warrant the need for the extra
   `bzr branch` command in the first line of the above procedure.

 - It is very important to use a shared repository locally when doing the
   extra branch to speed things up. There are other ways to speed up the
   procedure, including doing the extra branch from a local clean branch of
   lp:maria, and/or using `bzr co --lightweight` and `bzr switch`; see
   previous emails on this subject or ask for help.

 - If one has a local "mypatch" branch that was already merged in the other
   direction (the "wrong" direction 2), that is not a problem. Just follow the
   above procedure to merge it again in the right direction. It is also ok to
   re-do the merge in the correct direction 1 from an unmerged branch, of

Just let me and/or the list know in case of problems or questions.

 - Kristian.