changeset 38428:a6addfd64507

tests: add test of uncommit with default phase as secret We didn't seem to have any test checking that uncommitting a draft commit with phase.new-phase=secret preserved the draft phase. Differential Revision: https://phab.mercurial-scm.org/D3817
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 19 Jun 2018 11:07:23 -0700
parents 7fbb5d76c555
children 32fba6fe893d
files tests/test-uncommit.t
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-uncommit.t	Sun Jun 17 15:52:08 2018 +0530
+++ b/tests/test-uncommit.t	Tue Jun 19 11:07:23 2018 -0700
@@ -278,6 +278,13 @@
   12: draft
   $ hg commit -m 'update ab again'
 
+Phase is preserved
+
+  $ hg uncommit --keep --config phases.new-commit=secret
+  $ hg phase -r .
+  15: draft
+  $ hg commit --amend -m 'update ab again'
+
 Uncommit with public parent
 
   $ hg phase -p "::.^"
@@ -294,7 +301,7 @@
   $ hg status
   A xyz
   $ hg phase -r .
-  16: draft
+  18: draft
   $ hg phase -r ".^"
   12: public