phase-shelve: Add test for shelve technique config
authorJason R. Coombs <jaraco@jaraco.com>
Wed, 10 Aug 2022 15:31:39 -0400
changeset 49461 ad1db3861a8b
parent 49460 2064bbf7a1d5
child 49462 b4535c88a05b
phase-shelve: Add test for shelve technique config
tests/test-shelve.t
--- a/tests/test-shelve.t	Wed Aug 10 14:39:28 2022 -0400
+++ b/tests/test-shelve.t	Wed Aug 10 15:31:39 2022 -0400
@@ -1575,3 +1575,23 @@
   default.patch
   default.shelve
 #endif
+
+
+-- allow for phase-based shelves to be disabled
+
+  $ hg update -q --clean .
+  $ hg strip -q --hidden -r 0
+  $ rm -r .hg/shelve*
+
+#if phasebased
+  $ cat <<EOF >> $HGRCPATH
+  > [shelve]
+  > store = strip
+  > EOF
+#endif
+
+  $ echo import this >> somefile.py
+  $ hg add somefile.py
+  $ hg shelve -q
+  $ hg log --hidden
+  $ hg unshelve -q