comparison mercurial/scmutil.py @ 47729:b66ae4468c9a

copy: use `set_tracked` instead of `normallookup` in `dirstatecopy` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11171
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 05:43:43 +0200
parents 46c318b9b9a4
children 7d908ee19b5b 1c447fb82232
comparison
equal deleted inserted replaced
47728:4d1ae9cba551 47729:b66ae4468c9a
1454 different reasons it might not end with dst being marked as copied from src. 1454 different reasons it might not end with dst being marked as copied from src.
1455 """ 1455 """
1456 origsrc = repo.dirstate.copied(src) or src 1456 origsrc = repo.dirstate.copied(src) or src
1457 if dst == origsrc: # copying back a copy? 1457 if dst == origsrc: # copying back a copy?
1458 if repo.dirstate[dst] not in b'mn' and not dryrun: 1458 if repo.dirstate[dst] not in b'mn' and not dryrun:
1459 repo.dirstate.normallookup(dst) 1459 repo.dirstate.set_tracked(dst)
1460 else: 1460 else:
1461 if repo.dirstate[origsrc] == b'a' and origsrc == src: 1461 if repo.dirstate[origsrc] == b'a' and origsrc == src:
1462 if not ui.quiet: 1462 if not ui.quiet:
1463 ui.warn( 1463 ui.warn(
1464 _( 1464 _(