# HG changeset patch # User Pierre-Yves David # Date 2019-09-26 21:43:32 # Node ID f3bcae1e9e23460e5085cfea549f3aaa21ddb71c # Parent 2cc453284d5c473dc722c1cca1d4ea403fc5ebd2 copies: expand the logic of usechangesetcentricalgo Using intermediate variable is clearer and will make is simple to expand the logic. Differential Revision: https://phab.mercurial-scm.org/D6930 diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -182,8 +182,9 @@ def _computeforwardmissing(a, b, match=N def usechangesetcentricalgo(repo): """Checks if we should use changeset-centric copy algorithms""" - return (repo.ui.config('experimental', 'copies.read-from') in - ('changeset-only', 'compatibility')) + readfrom = repo.ui.config('experimental', 'copies.read-from') + changesetsource = ('changeset-only', 'compatibility') + return readfrom in changesetsource def _committedforwardcopies(a, b, base, match): """Like _forwardcopies(), but b.rev() cannot be None (working copy)"""