Patchwork D11171: copy: use `update_file` instead of `normallookup` in `dirstatecopy`

login
register
mail settings
Submitter phabricator
Date July 19, 2021, 2:10 p.m.
Message ID <differential-rev-PHID-DREV-ko545toc4vosn3pwsnut-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49484/
State Superseded
Headers show

Comments

phabricator - July 19, 2021, 2:10 p.m.
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

Patch

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: