Mercurial > hg
comparison mercurial/scmutil.py @ 48105:207df24a31f6
dirstate-item: use `added` instead of `state` when moving dirstate
Differential Revision: https://phab.mercurial-scm.org/D11542
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 18:37:54 +0200 |
parents | 8f452fecd0a4 |
children | a44bb185f6bd |
comparison
equal
deleted
inserted
replaced
48104:e8d6261513b9 | 48105:207df24a31f6 |
---|---|
1503 dst: oldcopies.get(src, src) | 1503 dst: oldcopies.get(src, src) |
1504 for dst, src in pycompat.iteritems(oldcopies) | 1504 for dst, src in pycompat.iteritems(oldcopies) |
1505 } | 1505 } |
1506 # Adjust the dirstate copies | 1506 # Adjust the dirstate copies |
1507 for dst, src in pycompat.iteritems(copies): | 1507 for dst, src in pycompat.iteritems(copies): |
1508 if src not in newctx or dst in newctx or ds[dst] != b'a': | 1508 if src not in newctx or dst in newctx or not ds.get_entry(dst).added: |
1509 src = None | 1509 src = None |
1510 ds.copy(src, dst) | 1510 ds.copy(src, dst) |
1511 repo._quick_access_changeid_invalidate() | 1511 repo._quick_access_changeid_invalidate() |
1512 | 1512 |
1513 | 1513 |