diff tests/test-hook.t @ 15131:7c26ce9edbd2

rollback: only restore dirstate and branch when appropriate. If the working dir parent was destroyed by rollback, then the old behaviour is perfectly reasonable: restore dirstate, branch, and bookmarks. That way the working dir moves back to an existing changeset rather than becoming an orphan. But if the working dir parent was unaffected -- say, you updated to an older changeset and then did rollback -- then it's silly to restore dirstate and branch. So don't do that. Leave the status of the working dir alone. (But always restore bookmarks, because that file refers to changeset IDs that may have been destroyed.)
author Greg Ward <greg@gerg.ca>
date Sun, 18 Sep 2011 19:59:33 -0400
parents 25c1f3ddd927
children 7cbb81c47025
line wrap: on
line diff
--- a/tests/test-hook.t	Fri Sep 16 21:38:06 2011 -0400
+++ b/tests/test-hook.t	Sun Sep 18 19:59:33 2011 -0400
@@ -277,7 +277,6 @@
   (run 'hg update' to get a working copy)
   $ hg rollback
   repository tip rolled back to revision 3 (undo pull)
-  working directory now based on revision 0
 
 preoutgoing hook can prevent outgoing changes