computing the resulting inventory from the merge changeset

Aaron Bentley aaron.bentley at utoronto.ca
Thu Dec 15 00:53:34 GMT 2005


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

duchier at ps.uni-sb.de wrote:
| Aaron Bentley <aaron.bentley at utoronto.ca> writes:
|
|
|>It does not look correct, because you're still doing things in more than
|>two phases.  In my view, the form used in the filesystem manipulation is
|>the simplest way to ensure it is correct.
|>
|>Here are the two phases as I see them:
|>1. remove the old names, in children-to-parents order
|>2. insert the new names, in parents-to-children order
|
|
| I really thought that was what I was doing, but perhaps you are
| concerned about the "deletion" phase following the "excision" phase.

Yes, that's what I meant.  After all that, I go and get my phase numbers
wrong.

| I'll have to think about it some more and deepen my understanding.
| Ultimately the algorithm should be provably correct..

| Actually, I thought that the 3rd loop was doing that, but perhaps
| there is yet another gap in my understanding (very likely)

No, it's a mistake in my email.  You are doing phase 2, but you've split
phase 1 into two steps.  To make that fail, we can do

$ mkdir foo
$ touch foo/bar
$ bzr add
$ bzr commit
$ rm foo/bar
$ bzr mv foo baz
$ bzr commit

Now what will happen is
1. we move the InventoryEntry for "foo" into saved
2. we attempt to delete the InventoryEntry for "bar" from new_env
3. since "bar" is no longer in new_inv (it was dragged out by moving its
parent) we throw an exception.

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

iD8DBQFDoL6N0F+nu1YWqI0RAhWRAJ4kxA2Z3skDb9HBmXNrjZs/xQsfsgCdF4cV
CssC7dDClZHp+MjFPltbs3c=
=Yjw9
-----END PGP SIGNATURE-----




More information about the bazaar mailing list