Patchwork D3814: tests: add test of uncommit with default phase as secret

login
register
mail settings
Submitter phabricator
Date June 19, 2018, 9:16 p.m.
Message ID <differential-rev-PHID-DREV-5dgwknvvuubgrk5lrh46-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32334/
State Superseded
Headers show

Comments

phabricator - June 19, 2018, 9:16 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We didn't seem to have any test checking that uncommitting a draft
  commit with phase.new-phase=secret preserved the draft phase.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3814

AFFECTED FILES
  tests/test-uncommit.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-uncommit.t b/tests/test-uncommit.t
--- a/tests/test-uncommit.t
+++ b/tests/test-uncommit.t
@@ -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