[MERGE] Make TreeTransform update the tree inventory on kind changes

Aaron Bentley aaron at aaronbentley.com
Fri Aug 1 01:39:23 BST 2008


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

James Westby wrote:
>> Instead of adding a new kind_change state, you should add a check in
>> apply_insertions to see a kind changes has occurred.
> 
> That's what I originally went for. However, the files have already been
> moved to libo by that point, so I couldn't get the old kind through
> self.tree_kind(). I'll look for a way to get that tomorrow.

Oh, I hadn't thought of that.  So maybe kind_change should be calculated
in TT.apply_insertions before doing apply_deletions, and passed into
apply_insertions.

In fact, I've been meaning to move inventory delta generation to a
separate function, but I certainly wouldn't expect that as part of this
bugfix.

>>> Also, I didn't add anything to the create_hardlink method, as
>>> I think that is used in the --hardlink code, and I don't think
>>> that it can be the cause of a kind change, is that correct?
>> No, it's incorrect.
> 
> Ok, I'll work out how to exercise this as well.

create_hardlink is morally equivalent to create_file.  The --hardlink
code won't change a file kind, but other callers could create hardlinks.

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

iD8DBQFIkls70F+nu1YWqI0RAqYpAJ9fvjGPH9YJ+etJc5Zt22OZE+ucGQCfVem+
+5adgiVm9YloKPiZZs9AACU=
=VFRZ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list