Preventing merge commits changing revision numbers on remote server

Asked by Laszlo Pandy on 2011-11-07

We have our main repository on a remote server which all developers access through bzr+ssh://.

Sometimes developers forget to do a pull (or update for bound branches), and instead do a merge. This is a problem because when they then push to the server, it succeeds even though they have changed the revision numbers for the commits which were merged.

For example, if the local branch has the first 10 commits, and the server has 5 more since the developer last updated, when they merge r11-15 will become 11.1.1, 11.1.2, etc. And the new commit has replaced the old r11.

A build is run for each revision, so if we want to talk about build 11, now it is ambiguous.

How can I make the server reject commits which rebase the revision numbers, even if the branches are not diverged?

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2011-11-07
Last reply:
2011-11-07
Jelmer Vernooij (jelmer) said : #1

On Mon 07 Nov 2011 15:41:16 CET, Laszlo Pandy wrote:
> New question #177894 on Bazaar:
> https://answers.launchpad.net/bzr/+question/177894
>
> We have our main repository on a remote server which all developers access through bzr+ssh://.
>
> Sometimes developers forget to do a pull (or update for bound branches), and instead do a merge. This is a problem because when they then push to the server, it succeeds even though they have changed the revision numbers for the commits which were merged.
>
> For example, if the local branch has the first 10 commits, and the server has 5 more since the developer last updated, when they merge r11-15 will become 11.1.1, 11.1.2, etc. And the new commit has replaced the old r11.
>
> A build is run for each revision, so if we want to talk about build 11, now it is ambiguous.
>
> How can I make the server reject commits which rebase the revision numbers, even if the branches are not diverged?
>

You can set the "append_revisions_only" configuration variable on the
remote branch, which will make bzr refuse revisions that change the
existing mainline. Run:

"bzr config append_revisions_only=True"

in the server branch.

Cheers,

Jelmer

Can you help with this problem?

Provide an answer of your own, or ask Laszlo Pandy for more information if necessary.

To post a message you must log in.