DirState.update_basis_by_delta checks Tree[0]
John Arbash Meinel
john at arbash-meinel.com
Thu May 19 06:07:05 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 5/19/2011 2:21 AM, Robert Collins wrote:
> On Thu, May 12, 2011 at 1:48 AM, John Arbash Meinel
> <john at arbash-meinel.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I'm trying to understand some failures that I've gotten when trying to
>> change pull and update to use "WT.update_basis_by_delta".
>
> IIRC update_basis_by_delta is -specifically- written for commit, and
> has sanity checks (because it was risky). You may wish to remove them
> (stripping some overhead).
>
> -Rob
Yeah, I've been rewriting it now. I ran into a lot of edge cases it
didn't handle. For example
In the WorkingTree we have ('dir', 'file', 'file-id'), but in the basis
tree we have ('other-dir', 'file', 'file-id'), and then the delta says
('other-dir/file', 'third-dir/file', 'file-id', ...)
The other one is if the tree has ('dir', 'file', 'file-id') and you add
('other-dir', 'file', 'file-id') you have to be able to sync the two,
even though they are at different paths.
It is a bit tricky to get right, but since I've seen the perf results, I
feel obligated to finish this off. :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3Us4kACgkQJdeBCYSNAAOCtQCePSVGXtd0q6xuUnKkvsBbpCWx
/kIAnAtfk17iRCw2RDajpFwSUxknCnUA
=ITmu
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list