Tree Transform passing all tests, plus abuse
Aaron Bentley
aaron.bentley at utoronto.ca
Mon Feb 20 19:38:16 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote:
>>| I feel like we need some sort of 'from' in there. like
>>| 'trans_id_from_tree_file_id'.
>>
>>That's quite a lengthy function name, which was why I wasn't putting
>>'from' in there.
>>
>
>
> It is long, and I don't really like it. It was just more clear.
Okay. I feel the same, but, I can go with it.
>>| Or maybe something like
>>|
>>| get_tree_file_id => file_id_of()
>>
>>That would be wrong, because tree_file_id is not the same as final_file_id.
> I guess my question is why do we need the tree_file_id based on path.
I don't think you're getting the distinction; there is nothing that ties
a file_id to a trans_id across the transform. The file id associated
with a transform in the tree may be "foo" in the tree, and it may be
None after the transform is applied. Or it may be "bar", with "foo"
assigned to some other trans_id.
> Don't we usually just need the path based on file id?
Maybe usually, but tree transforms apply to the whole tree, not just to
versioned files in the tree. The only sensible way I know of to refer
to an unversioned file is by its path.
> I realize there is
> probably 1 case (you need to check the target tree id for where you are
> planning on putting the file).
Yes, operations that produce new files or change paths in populated
trees (i.e. revert and merge) must make sure that any existing,
unversioned files are taken care of.
We also need them to get the parent trans_ids associated with files.
And for moving the tree root.
> Overall, I don't think we've had any major insight that lets us do any
> better than what we already have. So +1 to the branch. As we are doing
> with Robert's work, we'll let the rest sort itself out after it is
> inside the codebase.
Okay, I'll make the name changes and give it a push.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD+hqn0F+nu1YWqI0RAnWVAJ4hx7BrtByZJmG5oPLTz2Txta79GACghzxi
k5eL7RKc7MogZ07QE4FTeq0=
=YXZj
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list