Merge lp:~jameinel/bzr/2.0b1-merge-sort into lp:~bzr/bzr/trunk-old
Proposed by
John A Meinel
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~jameinel/bzr/2.0b1-merge-sort |
Merge into: | lp:~bzr/bzr/trunk-old |
Diff against target: | 182 lines |
To merge this branch: | bzr merge lp:~jameinel/bzr/2.0b1-merge-sort |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Approve | ||
Review via email: mp+10253@code.launchpad.net |
To post a comment you must log in.
This is a small tweak to how merge_sort counts 'merge_depth'. I think this is actually what we want. I believe Gary van der Merwe had noticed this in the past while working on qlog.
Basically the situation is (time going down):
A
|
B-.
|\ \
| | C
| |/
| D
|/
F
The question is whether this should be logged as (time going up for log):
F
D
C
B
A
or
F
D
C
B
A
As C is a right-hand parent of D, I think it makes sense to increase its merge depth, even though the left-hand parent of D is a mainline ancestor.
Looking at the fix, I think it was just a matter of not paying attention to the:
continue statement between when we pull off the left-hand parent and when we decide that the current node is a left-hand and thus doesn't increment the merge depth.
I'm working on an optimized Pyrex version, and so came across this.