From patchwork Mon Jul 19 14:10:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D11171: copy: use `update_file` instead of `normallookup` in `dirstatecopy` From: phabricator X-Patchwork-Id: 49484 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 19 Jul 2021 14:10:17 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is the newer, more semantic API. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11171 AFFECTED FILES mercurial/scmutil.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1456,7 +1456,7 @@ origsrc = repo.dirstate.copied(src) or src if dst == origsrc: # copying back a copy? if repo.dirstate[dst] not in b'mn' and not dryrun: - repo.dirstate.normallookup(dst) + repo.dirstate.set_tracked(dst) else: if repo.dirstate[origsrc] == b'a' and origsrc == src: if not ui.quiet: