##// END OF EJS Templates
revert: handle unknown files through status...
Pierre-Yves David -
r22236:3c24fb96 default
parent child Browse files
Show More
@@ -2378,11 +2378,14 b' def revert(ui, repo, ctx, parents, *pats'
2378 2378 # Find status of all file in `names`.
2379 2379 m = scmutil.matchfiles(repo, names)
2380 2380
2381 changes = repo.status(node1=node, match=m, clean=True)
2381 changes = repo.status(node1=node, match=m,
2382 unknown=True, ignored=True, clean=True)
2382 2383 modified = set(changes[0])
2383 2384 added = set(changes[1])
2384 2385 removed = set(changes[2])
2385 _deleted = set(changes[3])
2386 _deleted = set(changes[3])
2387 unknown = set(changes[4])
2388 unknown.update(changes[5])
2386 2389 clean = set(changes[6])
2387 2390
2388 2391 # split between files known in target manifest and the others
@@ -2471,6 +2474,7 b' def revert(ui, repo, ctx, parents, *pats'
2471 2474 'remove': ([], removeforget),
2472 2475 'undelete': ([], _('undeleting %s\n')),
2473 2476 'noop': (None, _('no changes needed to %s\n')),
2477 'unknown': (None, _('file not managed: %s\n')),
2474 2478 }
2475 2479
2476 2480
@@ -2489,6 +2493,7 b' def revert(ui, repo, ctx, parents, *pats'
2489 2493 (removed, actions['add'], backup),
2490 2494 (dsremoved, actions['undelete'], backup),
2491 2495 (clean, actions['noop'], discard),
2496 (unknown, actions['unknown'], discard),
2492 2497 )
2493 2498
2494 2499 for abs, (rel, exact) in sorted(names.items()):
General Comments 0
You need to be logged in to leave comments. Login now