comparison mercurial/changegroup.py @ 38978:d2ab0db89465

changegroup: key off changelogdone We use self._changelogdone for similar checks. Let's make things consistent. Differential Revision: https://phab.mercurial-scm.org/D4135
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 06 Aug 2018 09:24:35 -0700
parents f7228c907ef4
children 6d726d1b08cb
comparison
equal deleted inserted replaced
38977:a1f694779b2f 38978:d2ab0db89465
631 # The one invariant we *know* holds is that the new (potentially 631 # The one invariant we *know* holds is that the new (potentially
632 # bogus) DAG shape will be valid if we order the nodes in the 632 # bogus) DAG shape will be valid if we order the nodes in the
633 # order that they're introduced in dramatis personae by the 633 # order that they're introduced in dramatis personae by the
634 # changelog, so what we do is we sort the non-changelog histories 634 # changelog, so what we do is we sort the non-changelog histories
635 # by the order in which they are used by the changelog. 635 # by the order in which they are used by the changelog.
636 if self._ellipses and self._clnodetorev: 636 if self._ellipses and self._changelogdone:
637 key = lambda n: self._clnodetorev[lookup(n)] 637 key = lambda n: self._clnodetorev[lookup(n)]
638 return [store.rev(n) for n in sorted(nodelist, key=key)] 638 return [store.rev(n) for n in sorted(nodelist, key=key)]
639 639
640 # for generaldelta revlogs, we linearize the revs; this will both be 640 # for generaldelta revlogs, we linearize the revs; this will both be
641 # much quicker and generate a much smaller bundle 641 # much quicker and generate a much smaller bundle