Mercurial > hg
changeset 42225:d8ca7b99fc51
copies: move check for experimental.copytrace==<falsy> earlier
I'm going to ignore experimental.copytrace when changeset-centric
algorithms are required. This little refactoring makes that easier to
add.
Differential Revision: https://phab.mercurial-scm.org/D6268
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 17 Apr 2019 14:42:23 -0700 |
parents | a20d7c6abff2 |
children | a6be3af3a397 |
files | mercurial/copies.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/copies.py Wed Apr 17 14:11:54 2019 -0700 +++ b/mercurial/copies.py Wed Apr 17 14:42:23 2019 -0700 @@ -410,7 +410,10 @@ return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {} copytracing = repo.ui.config('experimental', 'copytrace') - boolctrace = stringutil.parsebool(copytracing) + if stringutil.parsebool(copytracing) is False: + # stringutil.parsebool() returns None when it is unable to parse the + # value, so we should rely on making sure copytracing is on such cases + return {}, {}, {}, {}, {} # Copy trace disabling is explicitly below the node == p1 logic above # because the logic above is required for a simple copy to be kept across a @@ -422,10 +425,6 @@ if _isfullcopytraceable(repo, c1, base): return _fullcopytracing(repo, c1, c2, base) return _heuristicscopytracing(repo, c1, c2, base) - elif boolctrace is False: - # stringutil.parsebool() returns None when it is unable to parse the - # value, so we should rely on making sure copytracing is on such cases - return {}, {}, {}, {}, {} else: return _fullcopytracing(repo, c1, c2, base)