Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 22186:a89bc7833e0d
revert: also track clean files
Tracking clean files is the simplest way to be able to reports files that need
no changes. So we explicitly retrieve them.
This fixes a couple of test outputs where the lack of changes was not reported.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 31 Jul 2014 15:52:56 -0700 |
parents | afead12e724b |
children | aee5385e4bae |
comparison
equal
deleted
inserted
replaced
22185:afead12e724b | 22186:a89bc7833e0d |
---|---|
2379 changes = repo.status(node1=node, match=m, clean=True) | 2379 changes = repo.status(node1=node, match=m, clean=True) |
2380 modified = set(changes[0]) | 2380 modified = set(changes[0]) |
2381 added = set(changes[1]) | 2381 added = set(changes[1]) |
2382 removed = set(changes[2]) | 2382 removed = set(changes[2]) |
2383 _deleted = set(changes[3]) | 2383 _deleted = set(changes[3]) |
2384 clean = set(changes[6]) | |
2384 | 2385 |
2385 # split between files known in target manifest and the others | 2386 # split between files known in target manifest and the others |
2386 smf = set(mf) | 2387 smf = set(mf) |
2387 | 2388 |
2388 # determine the exact nature of the deleted changesets | 2389 # determine the exact nature of the deleted changesets |
2447 (missingmodified, (actions['remove'], True)), | 2448 (missingmodified, (actions['remove'], True)), |
2448 (dsadded, (actions['revert'], True)), | 2449 (dsadded, (actions['revert'], True)), |
2449 (missingadded, (actions['remove'], False)), | 2450 (missingadded, (actions['remove'], False)), |
2450 (dsremoved, (actions['undelete'], True)), | 2451 (dsremoved, (actions['undelete'], True)), |
2451 (missingremoved, (None, False)), | 2452 (missingremoved, (None, False)), |
2453 (clean, (None, False)), | |
2452 ) | 2454 ) |
2453 | 2455 |
2454 for abs, (rel, exact) in sorted(names.items()): | 2456 for abs, (rel, exact) in sorted(names.items()): |
2455 # hash on file in target manifest (or None if missing from target) | 2457 # hash on file in target manifest (or None if missing from target) |
2456 mfentry = mf.get(abs) | 2458 mfentry = mf.get(abs) |