D6930: copies: expand the logic of usechangesetcentricalgo
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Tue Oct 1 12:32:53 UTC 2019
marmoute created this revision.
marmoute added reviewers: martinvonz, durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Using intermediate variable is clearer and will make is simple to expand the
logic.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6930
AFFECTED FILES
mercurial/copies.py
CHANGE DETAILS
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -182,8 +182,9 @@
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)"""
To: marmoute, martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list