Kash Farooq's software development blog

.NET Developer

Bazaar SVN plugin and the append_revisions_only error

Posted by Kash Farooq on November 16, 2009

If you try to push changes from your Bazaar feature branch back to a Subversion repository, and the Subversion repository has been changed since you created your Bazaar branch, you may get something like this:

bzr push
Using saved push location: svn+http://svn/repos/Trunk/MyProject
bzr: ERROR: Operation denied because it would change the mainline history. Set the append_revisions_only setting to False on branch "svn+http://svn/repos/Trunk/MyProject" to allow the mainline to change.

The current version of Bazaar on Windows does not give you much information on where you have to do this.

This is what I did to allow me to push code back into Subversion.
Find subversion.conf. It is located at:

  1. Windows Vista: C:\Users\your-user-name\AppData\Roaming\bazaar\2.0\
  2. Windows XP/2003: C:\Documents and Settings\your-user-name\ApplicationData\bazaar\2.0\

Inside this file you’ll see something like this:

[4ef181b9-d188-42c4-ae88-5d15bdaece0b]
locations = svn+http://svn/repos/Trunk/MyProject

Simply change the file to:

[4ef181b9-d188-42c4-ae88-5d15bdaece0b]
locations = svn+http://svn/repos/Trunk/MyProject
append_revisions_only = False
Advertisements

4 Responses to “Bazaar SVN plugin and the append_revisions_only error”

  1. orip said

    Another option, which doesn’t muck up svn’s history and blame, is to rebase from svn instead of merging from svn. If you rebase, your commits only append.

    bzr rebase
    bzr push

    I’ve seen an ongoing debate in the DVCS world between merge-and-commit vs. rebase-and-commit, but when working with SVN it has a profound effect on understanding the repository history, which is why append_revisions_only is True by default.

  2. Hmm, rebasing didn’t help me:

    $ bzr rebase
    Rebasing on svn+ssh://web-svn/var/svn/cms/trunk
    No revisions to rebase.
    $ bzr push
    Using saved push location: svn+ssh://web-svn/var/svn/cms/trunk
    bzr: ERROR: Operation denied because it would change the mainline history. Set the append_revisions_only setting to False on branch “svn+ssh://web-svn/var/svn/cms/trunk” to allow the mainline to change.

  3. […] on how to do this.  The best I have found so far is kashfarooq.  On of the more useful posts is this one which explains how to merge with the remote subversion client.  I was having problems and had to […]

Sorry, the comment form is closed at this time.

 
%d bloggers like this: