Weird failure of a merge to local branch

Eli Zaretskii eliz at gnu.org
Thu Dec 9 17:55:22 GMT 2010


> Date: Wed, 08 Dec 2010 19:51:54 -0500
> From: Aaron Bentley <aaron at aaronbentley.com>
> CC: bazaar at lists.canonical.com
> 
> On 12/07/2010 01:39 PM, Eli Zaretskii wrote:
> > Sorry, I spoke too soon, because after doing the above and resolving
> > the 4 text conflicts, "bzr status" still says that working tree is out
> > of date and suggest to run "bzr update".
> 
> I can't think of how a merge could cause the tree to get out of date.
> Merges don't commit or anything.  Perhaps this was caused by one of the
> steps you took when trying to fix this issue?

I didn't take any steps, except what you recommended: delete the
pending-deletion directory, then "bzr revert", then "bzr merge --pull"
again.  And before I had your recommendations, I did nothing except
"bzr status" and looking into the pending-deletion directory with
Emacs.

> > It also shows a pending
> > merge tip.  I think it means that this branch diverged from its
> > parent, which is not what I want (this branch is supposed to be a
> > perfect replica of its parent, because I always merge any changes I
> > make in it back to the parent).
> 
> You mean you push any changes you make in it back to the parent?
> Because if you merge them in the parent, the parent will have a
> different revision-id, even though the files will have the same contents.

That's true, but only until the next "bzr merge --pull" from the
parent branch.  Then the two branches are again on the same revision.

> > If there are no better ideas, I would tend to "bzr update -r" to some
> > old revision which I know was in sync with the parent, then do the
> > same "bzr merge --pull" again from the parent to get this branch in
> > sync.
> 
> I didn't realize you were doing merge --pull until now.  Please be more
> explicit about that in the future, as that option radically changes the
> behaviour-- it's not what I understand "bzr merge" to mean.

Sorry, I thought the fact that it shows in the portion of .bzr.log I
posted was enough.  Will do better next time.

> I suspect that your merge --pull was actually doing a pull, not a
> merge, when this happened.

That's what I would expect, yes.  My workflow with this branch is
supposed to keep it that way.

> That would explain why your tree was out of date.

Could you please explain how it explains that?  I guess this is
somehow related to the fact that it failed to remove pending-deletion,
because "merge --pull" never needed any subsequent "bzr update" before
this incident.  But I still don't see how the tree could be outdated,
since pending-deletion can be deleted with no effect on the working
tree, right?

> Doing "update -r" with an old revno will not do what you want.  Your
> tree is already on an old revision-- you need to get it up to date with
> its branch.  "bzr update" WITHOUT -r will do that.

What does "bzr update" do in this situation?  I only ever use "bzr up"
to sync a bound branch with the upstream repository.  The docs is
quite unclear what exactly does this do, at least not clear enough for
me.  What is its semantics in this situation?

TIA



More information about the bazaar mailing list