Show More
@@ -2464,7 +2464,16 b' class revlog(object):' | |||
|
2464 | 2464 | |
|
2465 | 2465 | rank = RANK_UNKNOWN |
|
2466 | 2466 | if self._format_version == CHANGELOGV2: |
|
2467 | rank = len(list(self.ancestors([p1r, p2r], inclusive=True))) + 1 | |
|
2467 | if (p1r, p2r) == (nullrev, nullrev): | |
|
2468 | rank = 1 | |
|
2469 | elif p1r != nullrev and p2r == nullrev: | |
|
2470 | rank = 1 + self.fast_rank(p1r) | |
|
2471 | elif p1r == nullrev and p2r != nullrev: | |
|
2472 | rank = 1 + self.fast_rank(p2r) | |
|
2473 | else: # merge node | |
|
2474 | pmin, pmax = sorted((p1r, p2r)) | |
|
2475 | rank = 1 + self.fast_rank(pmax) | |
|
2476 | rank += sum(1 for _ in self.findmissingrevs([pmax], [pmin])) | |
|
2468 | 2477 | |
|
2469 | 2478 | e = revlogutils.entry( |
|
2470 | 2479 | flags=flags, |
General Comments 0
You need to be logged in to leave comments.
Login now