Skip to content
Snippets Groups Projects
Commit 9d0b6ef9 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

test-merge-tools: fix flaky test by avoiding debugsetparents

debugsetparents is a debug command and does not provide the same
guarantees as non-debug commands do. In particular, when the user sets
a different parent, any clean files will remain clean in the dirstate
even though the new parent might have a different version of the file
(so it should appear modified compared to the new parent). Let's
instead achieve the same effect by updating to the new parent and
reverting the contents back to what they were.

This fix can be tested by passing '--config
debug.dirstate.delaywrite=2' to the 'hg update' command in the
beforemerge().
parent a450e0a2
No related branches found
No related tags found
No related merge requests found
......@@ -603,7 +603,8 @@
true.priority=1
true.executable=cat
# hg update -C 1
$ hg debugsetparent 0
$ hg update -q 0
$ hg revert -q -r 1 .
$ hg update -r 2
merging f
revision 1
......@@ -628,7 +629,8 @@
true.priority=1
true.executable=cat
# hg update -C 1
$ hg debugsetparent 0
$ hg update -q 0
$ hg revert -q -r 1 .
$ hg update -r 2 --tool false
merging f
merging f failed!
......
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