# HG changeset patch # User Pierre-Yves David # Date 2014-08-29 23:49:28 # Node ID f6a1386d540e8d45baf3d7072f430094950e2820 # Parent 8da5864dcfda574197de9a2d66c55dcebaf51a56 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. diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2525,7 +2525,7 @@ def revert(ui, repo, ctx, parents, *pats # Modified compared to target, local change (dsmodified, actions['revert'], backup), # Added since target - (dsadded, actions['remove'], backup), + (dsadded, actions['remove'], discard), # Removed since target, before working copy parent (removed, actions['add'], backup), # Removed since targe, marked as such in working copy parent @@ -2537,7 +2537,7 @@ def revert(ui, repo, ctx, parents, *pats (unknown, actions['unknown'], discard), ) - needdata = ('revert', 'add', 'remove', 'undelete') + needdata = ('revert', 'add', 'undelete') _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) for abs, (rel, exact) in sorted(names.items()):