[MERGE] commit of removals respects filespec (fixes #46635)

Aaron Bentley aaron.bentley at utoronto.ca
Tue Jul 11 19:35:30 BST 2006


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

John Arbash Meinel wrote:
> I think I understand what you mean.
> deletion => Deleted from disk, but not removed from the working
> inventory (these are currently 'auto deleted')
> removal => was removed from working inventory with 'bzr rm'. may or may
> not exist on disk.

Right.

> I think it would be reasonable to have a function that can build up a
> new inventory from two trees and a filespec.
> 
> compare_trees() isn't perfect at this point, because it goes through
> 'list_files()' which has no way to represent missing files, so they
> currently get marked as deleted.

I think that would actually be okay, for the purpose of commit.

What irked me about this bug is it happened because we reimplemented
tree comparison, which has already been implemented several times.  If
we do it right, we should only need one implementation of tree
comparison, and we can make sure that one is really good instead of
dividing our efforts among several.  We can layer the existing
interfaces on top of that.

> Seems okay. +1 from me. I don't really like the double iteration stuff,
> but for now, it fixes the bug. And we can do it more correctly as we
> modify the api.

I think comparing two trees requires you to iterate through both of
them.  The only choice is whether you do it serially or in parallel.

Another way of implementing this functionality would be to copy the base
inventory, then iterate through the working inventory, and apply the
changes in the working inventory for the specified files.  But copying
the base inventory would require iteration, too.

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

iD8DBQFEs+9y0F+nu1YWqI0RAt4TAJ9WJyXvEY+p9DSk0Dk6oniSTuHC2ACfblQf
IlCZ85J7qBUeHtLhc9mdfqs=
=anyZ
-----END PGP SIGNATURE-----




More information about the bazaar mailing list