[MERGE] Native dirstate update-basis-via-delta
Robert Collins
robertc at robertcollins.net
Wed Oct 24 02:36:12 BST 2007
On Tue, 2007-10-23 at 20:16 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> >
> > Any specific area? We have a number of tests of this already -
> > wt_implementations.get_parents tests just about every permutation I
> > could think of.
>
> Ok, there does seem to be sufficient testing. Just that you were adding a patch
> but not really adding a lot of tests.
> It seems like the tests were actually added for the inventory-based form a
> while ago, and now there is a custom WT4 implementation.
Yup. I wrote the most applicable form of it first, with the intent to
come back, like I am now, to do a fast version.
> The one I didn't see tested was swapping a parent with a child. eg:
>
> bzr mv foo/bar bar
> bzr mv foo bar/foo
>
> You did
> bzr mv foo tmp
> bzr mv bar foo
> bzr mv tmp bar
>
> Which is close, but not quite the same. I believe the parent to child swap is
> the one that forces a lot of the deletes before adds work.
Well, there is already a test that breaks when the application of
deletes is not done precisely as it is now, but this is still a good
test to have, so I'm adding it.
> >
> >> One problem we have with dirstate, is that if the basis inventory gets skewed
> >> from reality, it can do nasty things, and we have very limited ability to
> >> detect it.
> >>
> >> Probably 'bzr check' should assert that "tree.basis_tree()" gives the same
> >> result at "tree.branch.repository.revision_tree(tree.last_revision())". That
> >> would at least go a way towards giving security in something like this which is
> >> mutating over time. (There is no point where we forcibly "sync" and verify that
> >> everything is 100% correct.)
> >
> > I think thats a good idea. Also bzr check should call tree._validate().
> >
> > Do you want these done as part of this patch?
>
> I would like the comparison to be done. It at least gives us a tool in case we
> suspect something is broken.
Doing.
New patch coming soon.
-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: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071024/e807fbb5/attachment.pgp
More information about the bazaar
mailing list