Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 22373:f6a1386d540e
revert: no backup for `dsadded` set
There is only one case where a backup is required in the `dsadded` set, and the
current backup mechanism fails to handle it. So we stop trying to do backups at
all for now. This will help us to simplify the backup code and finally fix
this backup issue.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 30 Aug 2014 01:49:28 +0200 |
parents | 8da5864dcfda |
children | 4509a16c76c2 |
comparison
equal
deleted
inserted
replaced
22372:8da5864dcfda | 22373:f6a1386d540e |
---|---|
2523 # Modified compared to target, no local change | 2523 # Modified compared to target, no local change |
2524 (modified, actions['revert'], discard), | 2524 (modified, actions['revert'], discard), |
2525 # Modified compared to target, local change | 2525 # Modified compared to target, local change |
2526 (dsmodified, actions['revert'], backup), | 2526 (dsmodified, actions['revert'], backup), |
2527 # Added since target | 2527 # Added since target |
2528 (dsadded, actions['remove'], backup), | 2528 (dsadded, actions['remove'], discard), |
2529 # Removed since target, before working copy parent | 2529 # Removed since target, before working copy parent |
2530 (removed, actions['add'], backup), | 2530 (removed, actions['add'], backup), |
2531 # Removed since targe, marked as such in working copy parent | 2531 # Removed since targe, marked as such in working copy parent |
2532 (dsremoved, actions['undelete'], backup), | 2532 (dsremoved, actions['undelete'], backup), |
2533 ## the following sets does not result in any file changes | 2533 ## the following sets does not result in any file changes |
2535 (clean, actions['noop'], discard), | 2535 (clean, actions['noop'], discard), |
2536 # Existing file, not tracked anywhere | 2536 # Existing file, not tracked anywhere |
2537 (unknown, actions['unknown'], discard), | 2537 (unknown, actions['unknown'], discard), |
2538 ) | 2538 ) |
2539 | 2539 |
2540 needdata = ('revert', 'add', 'remove', 'undelete') | 2540 needdata = ('revert', 'add', 'undelete') |
2541 _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) | 2541 _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) |
2542 | 2542 |
2543 for abs, (rel, exact) in sorted(names.items()): | 2543 for abs, (rel, exact) in sorted(names.items()): |
2544 # target file to be touch on disk (relative to cwd) | 2544 # target file to be touch on disk (relative to cwd) |
2545 target = repo.wjoin(abs) | 2545 target = repo.wjoin(abs) |