dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25046
Re: Reverting?
On Tue, Nov 15, 2011 at 10:15:43PM +0100, Martin Sandve Alnæs wrote:
> 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.
Thanks. And how does one add back the changes once they have been
fixed.
In the first case, I would do this in my local (checked out) 1.0.x:
$ bzr revert -r 19
$ bzr commit -m "Backout fix for bug #5"
Then I would fix the bug in my local 1.0.x-logg.
How do I then get the changes from 1.0.x-logg (including the
changesets that were reverted) from 1.0.x-logg into 1.0.x?
Just the usual way?
cd 1.0.x
bzr merge ../1.0.x-logg
bzr commit -m "Proper fix for bug #5"
--
Anders
Follow ups
References