diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -365,20 +365,18 @@ if c2.node() is None and c1.node() == repo.dirstate.p1(): return repo.dirstate.copies(), {}, {}, {}, {} - copytracing = repo.ui.config('experimental', 'copytrace') - # 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 # rebase. - if copytracing == 'off': - return {}, {}, {}, {}, {} - elif copytracing == 'heuristics': + if repo.ui.config('experimental', 'copytrace') == 'heuristics': # Do full copytracing if only non-public revisions are involved as # that will be fast enough and will also cover the copies which could # be missed by heuristics if _isfullcopytraceable(repo, c1, base): return _fullcopytracing(repo, c1, c2, base) return _heuristicscopytracing(repo, c1, c2, base) + elif not repo.ui.configbool('experimental', 'copytrace'): + return {}, {}, {}, {}, {} else: return _fullcopytracing(repo, c1, c2, base) @@ -871,7 +869,8 @@ """ exclude = {} if (skiprev is not None and - repo.ui.config('experimental', 'copytrace') != 'off'): + (repo.ui.config('experimental', 'copytrace') == 'heuristics' or + repo.ui.configbool('experimental', 'copytrace'))): # copytrace='off' skips this line, but not the entire function because # the line below is O(size of the repo) during a rebase, while the rest # of the function is much faster (and is required for carrying copy