diff --git a/hgext3rd/copytrace.py b/hgext3rd/copytrace.py --- a/hgext3rd/copytrace.py +++ b/hgext3rd/copytrace.py @@ -75,7 +75,7 @@ ("", "drafttrace", None, _("enable copytracing for draft branches."))) - # With experimental.disablecopytrace=True there can be cryptic merge errors. + # With experimental.copytrace=off there can be cryptic merge errors. # Let"s change error message to suggest re-running the command with # enabled copytracing filemerge._localchangedotherdeletedmsg = _( @@ -105,10 +105,10 @@ # even with disabled copytracing, so we don't want to log it. if orig != fco.path() and fco.cmp(fcd): # copytracing was in action, let's record it - if not repo.ui.configbool("experimental", "disablecopytrace"): - msg = "success" + if repo.ui.config('experimental', 'copytrace') == 'on': + msg = 'success (fastcopytracing)' else: - msg = "success (fastcopytracing)" + msg = 'success' try: destctx = _getctxfromfctx(fcd) @@ -128,8 +128,7 @@ def _runcommand(orig, lui, repo, cmd, fullargs, ui, *args, **kwargs): if "--tracecopies" in fullargs: - ui.setconfig("experimental", "disablecopytrace", - False, "--tracecopies") + ui.setconfig('experimental', 'copytrace', 'on', '--tracecopies') return orig(lui, repo, cmd, fullargs, ui, *args, **kwargs) def _amend(orig, ui, repo, old, extra, pats, opts): @@ -325,7 +324,7 @@ """ - if not repo.ui.configbool("experimental", "disablecopytrace"): + if repo.ui.config('experimental', 'copytrace') == 'on': # user explicitly enabled copytracing - use it return orig(repo, cdst, csrc, base) @@ -335,7 +334,7 @@ # If base, source and destination are all draft branches, let's use full # copytrace for increased capabilities since it will work fast enough if _isfullcopytraceable(repo.ui, cdst, base): - configoverrides = {('experimental', 'disablecopytrace'): False} + configoverrides = {('experimental', 'copytrace'): 'on'} with repo.ui.configoverride(configoverrides, 'mergecopies'): result = orig(repo, cdst, csrc, base) if repo.ui.configbool("copytrace", "enableamendcopytrace", True): diff --git a/tests/copytrace.sh b/tests/copytrace.sh --- a/tests/copytrace.sh +++ b/tests/copytrace.sh @@ -5,6 +5,6 @@ enablefilldb = True fastcopytrace = True [experimental] -disablecopytrace = True +copytrace = off EOF } diff --git a/tests/test-copytrace-amend.t b/tests/test-copytrace-amend.t --- a/tests/test-copytrace-amend.t +++ b/tests/test-copytrace-amend.t @@ -8,7 +8,7 @@ > [fbamend] > userestack=True > [experimental] - > disablecopytrace=True + > copytrace=off > evolution=createmarkers > EOF diff --git a/tests/test-copytrace-errormsg.t b/tests/test-copytrace-errormsg.t --- a/tests/test-copytrace-errormsg.t +++ b/tests/test-copytrace-errormsg.t @@ -4,7 +4,7 @@ > rebase= > copytrace=$TESTDIR/../hgext3rd/copytrace.py > [experimental] - > disablecopytrace=True + > copytrace=off > EOF $ hg init repo diff --git a/tests/test-copytrace.t b/tests/test-copytrace.t --- a/tests/test-copytrace.t +++ b/tests/test-copytrace.t @@ -5,7 +5,7 @@ > rebase= > shelve= > [experimental] - > disablecopytrace=True + > copytrace=off > EOF Check filename heuristics (same dirname and same basename) diff --git a/tests/test-merge-conflictinfo.t b/tests/test-merge-conflictinfo.t --- a/tests/test-merge-conflictinfo.t +++ b/tests/test-merge-conflictinfo.t @@ -363,7 +363,7 @@ deleted: - $ hg rebase -d 2 -s 1 --config experimental.disablecopytrace=True + $ hg rebase -d 2 -s 1 --config experimental.copytrace=off rebasing 1:ec87889f5f90 "source" other [source] changed file which local [dest] deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u @@ -437,7 +437,7 @@ deleted: - $ hg rebase -d 2 -s 1 --config experimental.disablecopytrace=True + $ hg rebase -d 2 -s 1 --config experimental.copytrace=off rebasing 1:e6e7483a8950 "source" local [dest] changed file which other [source] deleted use (c)hanged version, (d)elete, or leave (u)nresolved? u