[MERGE] 3-number dotted revnos
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 15 21:40:54 GMT 2008
Ian Clatworthy wrote:
> Tests. The only bit I don't understand is how the "merge depth" is
> calculated by MergeSorter. In particular, in test_merge_sort_race, why
> is the merge depth of C 1 (and not 2)? (Might be best to explain this
> over IRC or phone as it's probably a bug in my brain.) Otherwise, all
> the new tests and changes look good to me.
> Ian C.
As near as I can tell, because it is a degenerate case. I didn't change
any of the merge depth code, so it is a carry-over from before. For the
| | C
I *think* what is happening is that both C=>B and D=>B are returning
right away, because we have already evaluated B. And the code uses the
check of "did this node have to step along its left-hand parent" to
determine if the right-hand nodes get a deeper merge depth.
Because if we add an extra node:
| X C
Then suddenly C gets a depth of 2 rather than 1. (which is part of the
I wasn't going to worry about it too much. If you want, I can file a bug
report on it.
More information about the bazaar