← Back to team overview

dolfin team mailing list archive

Re: Reverting?

 

On 15 November 2011 22:05, Anders Logg <logg@xxxxxxxxx> wrote:
> On Tue, Nov 15, 2011 at 09:51:06PM +0100, Anders Logg wrote:
>> My recent work has broken the buildbot. Can anyone give a quick tip
>> for how to revert the changes from the branch in such a way that I can
>> reapply the changes + a proper fix later?
>>
>> It should be fairly quick to resolve the issue but I might as well
>> learn to revert the proper way.
>
> I believe Marie has pushed a bug fix now, but if someone has a good
> recipe please share. I can add it to the web docs for future
> reference.

Revert the entire state to revision 19:
bzr revert -r 19
bzr commit -m "Backout fix for bug #5"

Revert one or more previous commits:
bzr merge -r 10..9   # backs out changes from commit 10
bzr merge -r 7..4   # backs out changes from commits 5,6,7

From
http://doc.bazaar.canonical.com/beta/en/user-guide/undoing_mistakes.html

Note that the important point here is that changes that have been
pushed somewhere else should be reverted or merged reversely like
above, not e.g. using uncommit because that would mess up your history
vs the already pushed history.

Martin


Follow ups

References