diff mercurial/commands.py @ 1447:508a3f559553

revert added and removed files to their normal state before reverting add a test for revert
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 25 Oct 2005 15:51:28 -0700
parents f84ed9c6131d
children 6fbb13b7a59f
line wrap: on
line diff
--- 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: