rollback: show that the safety works in a associated test
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 15 Feb 2023 20:47:08 +0100
changeset 50066 ebb8648483db
parent 50065 927da152800c
child 50067 059910ac7b76
rollback: show that the safety works in a associated test That test section is checking that --force is overcoming the safety check, however we did not check that the safety properly detect the situation. We now do for clarity.
tests/test-rollback.t
--- a/tests/test-rollback.t	Tue Feb 14 00:40:27 2023 +0100
+++ b/tests/test-rollback.t	Wed Feb 15 20:47:08 2023 +0100
@@ -76,6 +76,10 @@
   (activating bookmark bar)
   $ cat .hg/undo.branch ; echo
   test
+  $ hg rollback
+  abort: rollback of last commit while not checked out may lose data
+  (use -f to force)
+  [255]
   $ hg rollback -f
   repository tip rolled back to revision 1 (undo commit)
   $ hg id -n