Skip to content
Snippets Groups Projects
Commit 93d72a7dd486 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

test: explicitly "add" file before some commit in test-keyword.t

`hg commit -A` will revert the `hg addremove` step if the commit fails. However
`hg rollback` currently does not.

We are about to improve internal consistency around transaction and dirstate
and the behavior of `hg rollback` will align on the other behavior in the
process.

Before doing so, we make sure the test is using a separate call to `hg add` to
avoid the test scenario to be affected by that future change.

note: the behavior change for `hg rollback` seems fine as it affect a niche
usecase and `hg rollback` usage have been strongly discouraged for a while.
parent 09367b3d23d8
12 merge requests!485branching: merge default into stable,!435dirstate-scoping [11] : remove dirstate-guard,!434dirstate-scoping [10] : start warning/breaking on bad usage,!433dirstate-scoping [09] : use `changing_files` context in many places,!432dirstate-scoping [08] : use change_files and transaction in the commit logic (sometimes),!430dirstate-scoping [06] : rework the way some extensions meddle with the dirstate content,!429dirstate-scoping [05] : improve locking of various commands,!427dirstate-scoping [04] : first cleanup wave for dirstate's backup,!426dirstate-scoping [03] : explicitly write the dirstate in a handful of place.,!425dirstate-scoping [02] : fix and improve transaction "quick" rollback,!424dirstate-scoping [01] : preliminary test change,!415dirstate-scoping [07] : introduce a changing_files context
...@@ -492,7 +492,8 @@ ...@@ -492,7 +492,8 @@
$ echo '$Id$' > y $ echo '$Id$' > y
$ echo '$Id$' > z $ echo '$Id$' > z
$ hg add y $ hg add y
$ hg commit -Am "rollback only" z $ hg add z
$ hg commit -m "rollback only" z
$ cat z $ cat z
$Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $ $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
$ hg --verbose rollback $ hg --verbose rollback
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment