[MERGE] compare_trees with all unknowns
Robert Collins
robertc at robertcollins.net
Tue Jul 25 00:26:31 BST 2006
On Mon, 2006-07-24 at 08:02 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
> > 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
>
> This is what we see. The problem is that without this fix,
> _compare_trees does a full delta, and doing:
>
> $ bzr st foo
> added:
> a
> b
> c
> renamed:
> d => e
> unknown:
> foo
>
> But if you did:
> $ bzr st a foo
> added:
> a
> unknown:
> foo
>
> It is a bug that supplying a list to 'compare_trees' gets filtered to
> only things with file ids, and then when it is passed to
> '_compare_trees' an empty list means do everything.
>
> Ultimately, we probably want to update 'compare_trees' (or its
> equivalent) so that we can include unknowns, conflicts, etc.
>
> But until we get there, I would at least like this bug fixed.
Sure. I'm currently working on status though, in my dirstate branch -
I'd like to be in sync with you on the changes. I haven't added unknowns
to the delta at this point - but I have got into the move of
compare_trees already.
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/20060725/3357a8fa/attachment.pgp
More information about the bazaar
mailing list