Show More
@@ -1382,6 +1382,7 b' static inline int index_baserev(indexObj' | |||||
1382 | static int index_issnapshotrev(indexObject *self, Py_ssize_t rev) |
|
1382 | static int index_issnapshotrev(indexObject *self, Py_ssize_t rev) | |
1383 | { |
|
1383 | { | |
1384 | int ps[2]; |
|
1384 | int ps[2]; | |
|
1385 | int b; | |||
1385 | Py_ssize_t base; |
|
1386 | Py_ssize_t base; | |
1386 | while (rev >= 0) { |
|
1387 | while (rev >= 0) { | |
1387 | base = (Py_ssize_t)index_baserev(self, rev); |
|
1388 | base = (Py_ssize_t)index_baserev(self, rev); | |
@@ -1399,6 +1400,20 b' static int index_issnapshotrev(indexObje' | |||||
1399 | assert(PyErr_Occurred()); |
|
1400 | assert(PyErr_Occurred()); | |
1400 | return -1; |
|
1401 | return -1; | |
1401 | }; |
|
1402 | }; | |
|
1403 | while ((index_get_length(self, ps[0]) == 0) && ps[0] >= 0) { | |||
|
1404 | b = index_baserev(self, ps[0]); | |||
|
1405 | if (b == ps[0]) { | |||
|
1406 | break; | |||
|
1407 | } | |||
|
1408 | ps[0] = b; | |||
|
1409 | } | |||
|
1410 | while ((index_get_length(self, ps[1]) == 0) && ps[1] >= 0) { | |||
|
1411 | b = index_baserev(self, ps[1]); | |||
|
1412 | if (b == ps[1]) { | |||
|
1413 | break; | |||
|
1414 | } | |||
|
1415 | ps[1] = b; | |||
|
1416 | } | |||
1402 | if (base == ps[0] || base == ps[1]) { |
|
1417 | if (base == ps[0] || base == ps[1]) { | |
1403 | return 0; |
|
1418 | return 0; | |
1404 | } |
|
1419 | } |
@@ -1775,7 +1775,17 b' class revlog:' | |||||
1775 | if base == nullrev: |
|
1775 | if base == nullrev: | |
1776 | return True |
|
1776 | return True | |
1777 | p1 = entry[5] |
|
1777 | p1 = entry[5] | |
|
1778 | while self.length(p1) == 0: | |||
|
1779 | b = self.deltaparent(p1) | |||
|
1780 | if b == p1: | |||
|
1781 | break | |||
|
1782 | p1 = b | |||
1778 | p2 = entry[6] |
|
1783 | p2 = entry[6] | |
|
1784 | while self.length(p2) == 0: | |||
|
1785 | b = self.deltaparent(p2) | |||
|
1786 | if b == p2: | |||
|
1787 | break | |||
|
1788 | p2 = b | |||
1779 | if base == p1 or base == p2: |
|
1789 | if base == p1 or base == p2: | |
1780 | return False |
|
1790 | return False | |
1781 | return self.issnapshot(base) |
|
1791 | return self.issnapshot(base) |
General Comments 0
You need to be logged in to leave comments.
Login now