[PATCH 4 of 6 topic-experiment] tests: add test to show topics working with shelve

Pulkit Goyal 7895pulkit at gmail.com
Wed Jun 28 17:08:26 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1498675267 -19800
#      Thu Jun 29 00:11:07 2017 +0530
# Node ID d1083a0b28ba3b13e41047c0a127cc8d585387af
# Parent  95eb263307c3f8f514f1c9cb5e15b8d8284b418a
# EXP-Topic resolvetopic
tests: add test to show topics working with shelve

diff --git a/tests/test-topic-shelve.t b/tests/test-topic-shelve.t
new file mode 100644
--- /dev/null
+++ b/tests/test-topic-shelve.t
@@ -0,0 +1,50 @@
+testing topic with shelve extension
+------------------------------------
+
+  $ . "$TESTDIR/testlib/topic_setup.sh"
+
+  $ hg init repo
+  $ cd repo
+  $ cat <<EOF >>.hg/hgrc
+  > [extensions]
+  > shelve=
+  > EOF
+
+  $ touch a
+  $ echo "Hello" >> a
+  $ hg topic "testing-shelve"
+  $ hg topic
+   * testing-shelve
+  $ hg ci -m "First commit" -A
+  adding a
+  $ hg topic
+   * testing-shelve
+  $ echo " World" >> a
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)
+
+shelve test
+-----------
+
+  $ hg shelve
+  shelved as default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg topic
+   * testing-shelve
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)
+
+unshelve test
+-------------
+  $ hg unshelve
+  unshelving change 'default'
+  $ hg topic
+   * testing-shelve
+  $ hg stack
+  ### topic: testing-shelve
+  ### branch: default
+  t1@ First commit (current)


More information about the Mercurial-devel mailing list