changeset 50171:d956ceed3289 stable

transaction: tests we don't overwrite branch changes on abort We actually do not! Great. …Why are doing a backup of the `branch` files at transaction creation then‽
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 22 Feb 2023 18:07:34 +0100
parents a9a13b160db9
children b90899794ced
files tests/test-transaction-wc-rollback-race.t
diffstat 1 files changed, 33 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-transaction-wc-rollback-race.t	Wed Feb 22 18:05:36 2023 +0100
+++ b/tests/test-transaction-wc-rollback-race.t	Wed Feb 22 18:07:34 2023 +0100
@@ -155,3 +155,36 @@
   $ hg status
   R default_a (missing-correct-output !)
   $ hg revert --all --quiet
+
+Changing branch from default
+----------------------------
+
+  $ hg branch
+  default
+  $ hg phase --public --rev 0 2> ../log.err &
+  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
+  $ hg branch celeste
+  marked working directory as branch celeste
+  $ hg branch
+  celeste
+  $ touch $TESTTMP/transaction-continue
+  $ wait
+  $ hg branch
+  celeste
+
+Changing branch from another one
+--------------------------------
+
+  $ hg up babar --quiet
+  $ hg branch
+  babar
+  $ hg phase --public --rev 0 2> ../log.err &
+  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
+  $ hg branch celeste
+  marked working directory as branch celeste
+  $ hg branch
+  celeste
+  $ touch $TESTTMP/transaction-continue
+  $ wait
+  $ hg branch
+  celeste