--- a/tests/test-topic-change.t Thu Oct 05 19:20:20 2017 +0530
+++ b/tests/test-topic-change.t Thu Oct 05 19:30:22 2017 +0530
@@ -357,3 +357,51 @@
o 8:86a186070af2 {}
Added a ()
+Changing topic on secret changesets
+-----------------------------------
+
+ $ hg up 26
+ switching to topic bar
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ (leaving bookmark bookboo)
+
+ $ hg phase -r . -s -f
+ $ hg phase -r .
+ 26: secret
+
+ $ hg topic -r . watwat
+ switching to topic watwat
+ changed topic on 1 changes
+
+ $ hg glog
+ @ 33:894983f69e69 {watwat}
+ | Added g ()
+ |
+ | o 32:1b83d11095b9 {movebook}
+ | | Added h (book bookboo)
+ | |
+ | x 26:7c76c271395f {bar}
+ |/ Added g ()
+ |
+ o 25:7f26084dfaf1 {bar}
+ | Added f ()
+ |
+ o 24:b1f05e9ba0b5 {bar}
+ | Added e ()
+ |
+ o 23:f9869da2286e {foo}
+ | Added d ()
+ |
+ o 22:1b88140feefe {foobar}
+ | Added c ()
+ |
+ o 21:c39cabfcbbf7 {foobar}
+ | Added b ()
+ |
+ o 8:86a186070af2 {}
+ Added a ()
+
+XXX: the phase must be preserved and hence must be secret
+
+ $ hg phase -r .
+ 33: draft