[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reversion revulsion

From: Óscar Fuentes
Subject: Re: reversion revulsion
Date: Fri, 08 Jan 2010 14:27:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> > cd .../trunk                        # 0
>> > bzr update                          # 1
>> > bzr merge ../quickfixes             # 2
>> > bzr commit                          # 3
>> > bzr revert --forget-merges          # 4
>> >
>> > IIUC step 3 publishes, as does step 4, defeating atomicity.
>> Nope, you have steps 3 and 4 reversed.
> I usually do it slightly differently (following the wiki):
>   cd ../trunk
>   bzr update
>   cd ../quickfixes
>   bzr merge
>   bzr commit

You can save the `cd's with

bzr update ../trunk
bzr merge
bzr commit

> Where would I put "bzr revert --forget-merges" in my case? wouldn't
> that be after the last "commit"?

You are doing something different from what we are discussing. We are
talking about not merging into upstream local revisions that adds
nothing interesting to the history. You are talking about getting the
latest changes from upstream and merging them into the quickfixes
branch. It is the opposite direction. You absolutely don't want to use
--forget-merges while merging upstream's changes into your branch,
because bzr would forget what revisions were already merged and try to
merge them again next time.

This brings another detail: if --forget-merges is used when you send the
changes from quickfixes to upstream via trunk, you need to reset the
quickfixes branch afterwards, because the next time you merge from
quickfixes it will include the previous revisions.

>> `bzr revert' does not modify committed history.
> As far as I understood from Juanma and Stephen, it actually does.
> Unless by ``committed history'' you mean something that excludes the
> history of merging revisions between branch and trunk.  What am I
> missing?

I'll rephrase: `bzr revert' does not modify history that already was
incorporated into the branch you are going to commit to. `revert'
operates on local uncommitted stuff.

>> Maybe you are
>> confusing it with `bzr uncommit', which NEVER should be used in trunk/?
> Not even if I need to revert the last commit?

No, because there is a race condition: someone can update from
upstream's trunk just before you execute the uncommit. To be sincere, I
don't know if bazaar is smart enough to realize that a revision was
removed from the remote branch and DTRT when people execute
`update'. Until this point is cleared, you'll better avoid `uncommit' on
trunk/ because if bzr does not the right thing, you can cause lots of


reply via email to

[Prev in Thread] Current Thread [Next in Thread]