[MERGE] compare_trees with all unknowns

Robert Collins robertc at robertcollins.net
Mon Jul 24 02:14:04 BST 2006


On Fri, 2006-07-21 at 10:18 -0500, John Arbash Meinel wrote:
> === modified file bzrlib/delta.py
> --- bzrlib/delta.py
> +++ bzrlib/delta.py
> @@ -184,6 +184,10 @@
>                  trees = trees + tuple(extra_trees)
>              specific_file_ids =
> tree.find_ids_across_trees(specific_files, 
>                  trees, require_versioned=require_versioned)
> +            if specific_files and not specific_file_ids:
> +                # All files are unversioned, so just return an empty
> delta
> +                # _compare_trees would think we want a complete delta
> +                return TreeDelta()
>              return _compare_trees(old_tree, new_tree, want_unchanged,
>                                    specific_file_ids)
>          finally:


I'm not sure this is right.

If we go back to the earlier discussion about tree deltas, having the
delta show differences between unknowns would be useful. However, this
will require _compare_trees to allow comparison of file paths too, as
well as file ids.

In terms of user experience, I'm thinking that 

$ bzr st foo
unknown:
  foo

is what we want to see. 

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060724/e3fe0323/attachment.pgp 


More information about the bazaar mailing list