diff -u /etc/alternatives/ /tmp/git-remote-bzr --- /etc/alternatives/git-remote-bzr 2013-12-07 00:20:48.000000000 +0100 +++ /tmp/git-remote-bzr 2014-01-06 09:18:59.000000000 +0100 @@ -679,7 +679,21 @@ if ref.startswith('refs/heads/'): name = ref[len('refs/heads/'):] branch = get_remote_branch(name) - branch.generate_revision_history(revid, marks.get_tip(name)) + + # This alone is not sufficient: + #- branch.generate_revision_history(revid, marks.get_tip(name)) + # + # Instead, we need to also handle the situation + # where the remote branch is configured with: + # append_revisions_only = True + # + # TODO: Refactor the "error message and continue". + + try: + branch.generate_revision_history(revid, marks.get_tip(name)) + except bzrlib.errors.AppendRevisionsOnlyViolation: + print "error %s non-fast forward" % ref + continue if name in peers: peer = bzrlib.branch.Branch.open(peers[name],