Weird failure of a merge to local branch

Aaron Bentley aaron at aaronbentley.com
Thu Dec 9 19:56:35 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/09/2010 12:55 PM, Eli Zaretskii wrote:
>> 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.

Yes, because that's pulling, not merging.

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

Nope, not enough.  I did see it afterwards, of course.

>> That would explain why your tree was out of date.
> 
> Could you please explain how it explains that?

Here are some of the steps in a pull:
1. Update the repository with new revisions
2. Update the branch tip to point at a new revision
3. Update the contents of the working tree.
4. Update the working tree tip to point at the branch tip revision

Step 3 failed for you, so your tree tip is out of date with your branch
tip.  You can use "bzr update" to redo steps 3 and 4.

> 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?

You're out of date because the branch has been updated and your tree has
not.

>> 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?

It updates your tree tip to match your branch tip, and updates your tree
contents to match.

> I only ever use "bzr up"
> to sync a bound branch with the upstream repository.

When you use it with a bound branch or heavyweight checkout, it behaves
similarly to a pull.

> The docs is
> quite unclear what exactly does this do, at least not clear enough for
> me.  What is its semantics in this situation?

- - Update the contents of the working tree. (3 above)
- - Update the working tree tip to point at the branch tip revision (4
above)

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0BNHIACgkQ0F+nu1YWqI3ZbgCfXoWP6elbAiQuR6ciWPGPpdiF
2WEAmgIZbT2nKs/dgXEsEXc8DLsxKXs2
=cYOH
-----END PGP SIGNATURE-----



More information about the bazaar mailing list