Mercurial > hg-stable
changeset 45673:7990e7d957b0
copies: move `merged` testing sooner
previously `is_merged` was an expensive callback. Now that all this data is
pre-computed, this is is a simple membership testing.
So it is probably cheaper than the membership testing.
Differential Revision: https://phab.mercurial-scm.org/D9141
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 01 Oct 2020 09:45:00 +0200 |
parents | f877b3628015 |
children | 66cb7ad3787c |
files | mercurial/copies.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/copies.py Thu Oct 01 09:42:39 2020 +0200 +++ b/mercurial/copies.py Thu Oct 01 09:45:00 2020 +0200 @@ -397,9 +397,9 @@ and dest in changes.salvaged ): minor[dest] = value - elif not isancestor(new_tt, other_tt): + elif changes is not None and dest in changes.merged: minor[dest] = value - elif changes is not None and dest in changes.merged: + elif not isancestor(new_tt, other_tt): minor[dest] = value