DirState.update_basis_by_delta checks Tree[0]

John Arbash Meinel john at arbash-meinel.com
Wed May 18 17:54:58 UTC 2011


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

On 5/12/2011 7:46 PM, Martin Pool wrote:
> On 11 May 2011 15:48, 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".
>>
>> Specifically, I get stuff like:
>> InconsistentDelta: An inconsistent delta was supplied involving 'c',
>> 'c-20110511114127-kuflw3huo8rkozik-2110'
>> reason: This was marked as a real delete, but the WT state claims that
>> it still exists and is versioned.
>>
>> What is weird, is that update_basis_by_delta is checking tree[0], which
>> is the active working tree, but we are asking it to change the content
>> of tree[1] the basis tree.
> 
> That sounds like a real bug, and a plausible analysis of it.  There
> are some open bugs about InconsistentDeltas so you might be able to
> earn epic karma, and also use them to check whether your analysis is
> correct.

Having dug even further into the issue, it turns out the code really
wasn't ready for this. I'm updating the tests to be more thorough. (I
think they were focused on the fact that our test suite already tested
commit very thoroughly.)

So the focused tests only did failure cases (invalid deltas).

For example, the update_basis_by_delta didn't handle renames well. (It
always assumed that the active tree would have already done the rename
work.)

The performance benefits are obviously there, so I'm going to keep
working on it. Just harder than I originally hoped it would be.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3UB/IACgkQJdeBCYSNAAPOsACfcO9eRxoNwrPawi2RECadFs91
pPoAniYeJgP0UakvIV8y+UwvMuByo1Ml
=CDEj
-----END PGP SIGNATURE-----



More information about the bazaar mailing list