mercurial/commands.py
changeset 1447 508a3f559553
parent 1444 f84ed9c6131d
child 1453 6fbb13b7a59f
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1824,6 +1824,10 @@ def revert(ui, repo, *names, **opts):
             chosen[relname] = 1
         return ret
 
+    (c, a, d, u) = repo.changes()
+    repo.forget(filter(choose, a))
+    repo.undelete(filter(choose, d))
+
     r = repo.update(node, False, True, choose, False)
     for n in relnames:
         if n not in chosen: