Show More
@@ -282,26 +282,28 b' def _trackphasechange(data, rev, old, ne' | |||
|
282 | 282 | while low < high: |
|
283 | 283 | mid = (low + high) // 2 |
|
284 | 284 | revs = data[mid][0] |
|
285 | revs_low = revs[0] | |
|
286 | revs_high = revs[-1] | |
|
285 | 287 | |
|
286 | if rev in revs: | |
|
288 | if rev >= revs_low and rev <= revs_high: | |
|
287 | 289 | _sortedrange_split(data, mid, rev, t) |
|
288 | 290 | return |
|
289 | 291 | |
|
290 |
if revs |
|
|
292 | if revs_low == rev + 1: | |
|
291 | 293 | if mid and data[mid - 1][0][-1] == rev: |
|
292 | 294 | _sortedrange_split(data, mid - 1, rev, t) |
|
293 | 295 | else: |
|
294 | 296 | _sortedrange_insert(data, mid, rev, t) |
|
295 | 297 | return |
|
296 | 298 | |
|
297 |
if revs |
|
|
299 | if revs_high == rev - 1: | |
|
298 | 300 | if mid + 1 < len(data) and data[mid + 1][0][0] == rev: |
|
299 | 301 | _sortedrange_split(data, mid + 1, rev, t) |
|
300 | 302 | else: |
|
301 | 303 | _sortedrange_insert(data, mid + 1, rev, t) |
|
302 | 304 | return |
|
303 | 305 | |
|
304 |
if revs |
|
|
306 | if revs_low > rev: | |
|
305 | 307 | high = mid |
|
306 | 308 | else: |
|
307 | 309 | low = mid + 1 |
General Comments 0
You need to be logged in to leave comments.
Login now