Reverting a single commit

John Szakmeister john at szakmeister.net
Sat Jul 17 11:50:41 BST 2010


On Sat, Jul 17, 2010 at 6:30 AM, Eli Zaretskii <eliz at gnu.org> wrote:
>> Date: Sat, 17 Jul 2010 06:26:54 -0400
>> From: John Szakmeister <john at szakmeister.net>
>> Cc: Bazaar <bazaar at lists.canonical.com>
>>
>> 'bzr merge -r X..X-1 .' should do the trick.
>
> Thanks.  Shouldn't it be "bzr merge -r X-1..X+1", though?  If not, I
> might be missing something subtle in how "merge" handles the revision
> ID.

No, what your command does is say "cherry pick revisions X-1, X, and
X+1.".  It brings *in* the changes from X-1, X, and X+1.

The command I gave is called a "reverse cherry pick".  It basically
says *back out* the changes introduced in X.  The catch here is that
the X-1 is exclusive rather than inclusive.

The docs might do a better job at talking about advanced merging in general:
   <http://doc.bazaar.canonical.com/bzr.dev/en/user-guide/adv_merging.html>

HTH!

-John



More information about the bazaar mailing list