[PATCH 3 of 7] revset: inline parents computation to reuse the input argument
Yuya Nishihara
yuya at tcha.org
Thu Jan 17 11:30:41 UTC 2019
On Tue, 15 Jan 2019 20:33:22 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1547481235 -3600
> # Mon Jan 14 16:53:55 2019 +0100
> # Node ID da8305b14fd8d61f7943c0f53480cfbb2358880d
> # Parent 0c8eb4ed3b0f0294f2cb2d328ffce70847489be9
> # EXP-Topic revset.predicates
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r da8305b14fd8
> revset: inline parents computation to reuse the input argument
Queued, thanks.
> @@ -1168,9 +1168,18 @@ def heads(repo, subset, x, order):
> # argument set should never define order
> if order == defineorder:
> order = followorder
> - s = getset(repo, subset, x, order=order)
> - ps = parents(repo, subset, x)
> - return s - ps
> + inputset = getset(repo, fullreposet(repo), x, order=order)
Since we do 'subset &', this can be just order=anyorder, and takeorder=True
can be removed.
> + return subset & (inputset - ps)
More information about the Mercurial-devel
mailing list