Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 48098:ba79d99ec1ae
dirstate-item: use item's property instead of `state` in addremove
Differential Revision: https://phab.mercurial-scm.org/D11535
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 15:39:33 +0200 |
parents | 37a41267d000 |
children | 8f452fecd0a4 |
comparison
equal
deleted
inserted
replaced
48097:d86875b75838 | 48098:ba79d99ec1ae |
---|---|
1325 unknown=True, | 1325 unknown=True, |
1326 ignored=False, | 1326 ignored=False, |
1327 full=False, | 1327 full=False, |
1328 ) | 1328 ) |
1329 for abs, st in pycompat.iteritems(walkresults): | 1329 for abs, st in pycompat.iteritems(walkresults): |
1330 dstate = dirstate[abs] | 1330 entry = dirstate.get_entry(abs) |
1331 if dstate == b'?' and audit_path.check(abs): | 1331 if (not entry.any_tracked) and audit_path.check(abs): |
1332 unknown.append(abs) | 1332 unknown.append(abs) |
1333 elif dstate != b'r' and not st: | 1333 elif (not entry.removed) and not st: |
1334 deleted.append(abs) | 1334 deleted.append(abs) |
1335 elif dstate == b'r' and st: | 1335 elif entry.removed and st: |
1336 forgotten.append(abs) | 1336 forgotten.append(abs) |
1337 # for finding renames | 1337 # for finding renames |
1338 elif dstate == b'r' and not st: | 1338 elif entry.removed and not st: |
1339 removed.append(abs) | 1339 removed.append(abs) |
1340 elif dstate == b'a': | 1340 elif entry.added: |
1341 added.append(abs) | 1341 added.append(abs) |
1342 | 1342 |
1343 return added, unknown, deleted, removed, forgotten | 1343 return added, unknown, deleted, removed, forgotten |
1344 | 1344 |
1345 | 1345 |