[MERGE] Make TreeTransform update the tree inventory on kind changes
John Arbash Meinel
john at arbash-meinel.com
Fri Aug 1 20:42:31 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Westby wrote:
> Let's try again.
>
> Thanks,
>
> James
>
>
BB:resubmit
1) We need to make sure the 'create_hardlink' doesn't run if the platform
doesn't support hardlinks.
2) According to Aaron, we already have the information we need. Apparently we
actually have *too* much information. I think his recommendation was something
along the lines of:
if file_id is not None and (trans_id in self._new_id or
trans_id in self._new_name or
trans_id in self._new_parent
or trans_id in self._new_executability):
needs_ie_delta = True
elif trans_id in self._new_content:
try:
kind = self.final_kind(trans_id)
except NoSuchFile:
if self.tree_kind(trans_id) != kind:
needs_ie_delta = True
else:
needs_ie_delta = False
if needs_ie_delta:
It feels a bit odd to be checking after the fact, when you can simply compute
it as you go ahead of time. But as long as it doesn't add a *lot* of overhead,
it seems ok.
3) At a minimum, I don't really like that all the other checks use the state
of the transform object (trans_id in self._new_name, etc) and this is using a
local variable. It certainly feels like kind changes should be part of the
state of the Transform object. As they are the *link* between
self._new_content and self.final_kind != self.tree_kind.
I will profess to not having the intimate knowledge of the internals, nor the
design goals of Transform that Aaron has.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIk2cnJdeBCYSNAAMRAv9ZAKCdC99BJBsc8TSBqw3aXjftU3s8SACgr/aD
5W5Tl69UqUw5eK0ta6TYmtQ=
=w2eY
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list