Patchwork D6930: copies: expand the logic of usechangesetcentricalgo

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2019, 5:07 p.m.
Message ID <8cd20a964f48d769468040a4c44266e8@localhost.localdomain>
Download mbox | patch
Permalink /patch/41902/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2019, 5:07 p.m.
Closed by commit rHGf3bcae1e9e23: copies: expand the logic of usechangesetcentricalgo (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6930?vs=16727&id=16750

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6930/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6930

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: marmoute, martinvonz, durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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)"""