tests/test-topic.t
branchmercurial-4.8
changeset 4356 a71f2271ed76
parent 4339 0f015fe4f71f
child 4359 2cbb9914d227
child 4548 d3cc1b55ad0a
--- a/tests/test-topic.t	Tue Jan 22 10:43:44 2019 -0500
+++ b/tests/test-topic.t	Tue Jan 22 10:46:02 2019 -0500
@@ -819,7 +819,40 @@
   s0^ Add file delta (base current)
 
   $ hg topics --age
-   * fran (1970-01-01 by test)
+   * fran (1970-01-01 by test, 1 changesets)
+
+  $ cd ..
+
+Relation subscript in revsets
+=============================
+
+  $ hg init more-than-one-commit-per-topic
+  $ cd more-than-one-commit-per-topic
+  $ cat > .hg/hgrc << EOF
+  > [phases]
+  > publish=false
+  > EOF
+
+  $ echo 0 > foo
+  $ hg ci -qAm 0
+  $ hg topic featureA
+  marked working directory as topic: featureA
+  $ echo 1 > foo
+  $ hg ci -qm 1
+  $ echo 2 > foo
+  $ hg ci -qm 2
+  $ echo 3 > foo
+  $ hg ci -qm 3
+  $ hg topic --clear
+  $ echo 4 > foo
+  $ hg ci -qm 4
+
+  $ tlog 'all()'
+  0: 
+  1: featureA
+  2: featureA
+  3: featureA
+  4: 
 
   $ cd ..
 
@@ -863,7 +896,7 @@
 
   $ hg topic topic1970 --rev 0
   switching to topic topic1970
-  changed topic on 1 changes
+  changed topic on 1 changesets to "topic1970"
 
   $ hg add b
   $ hg topic topic1990
@@ -903,18 +936,23 @@
    * topic2010 (1 changesets)
 
   $ hg topics --age
-   * topic2010 (2010-01-01 by bar)
-     topic1990 (1990-01-01 by foo)
-     topic1970 (1970-01-01 by test)
+   * topic2010 (2010-01-01 by bar, 1 changesets)
+     topic1990 (1990-01-01 by foo, 1 changesets)
+     topic1970 (1970-01-01 by test, 1 changesets)
+
+  $ hg topics --age --verbose
+   * topic2010 (2010-01-01 by bar, on branch: default, 1 changesets)
+     topic1990 (1990-01-01 by foo, on branch: default, 1 changesets)
+     topic1970 (1970-01-01 by test, on branch: default, 1 changesets)
 
   $ hg up topic1970
   switching to topic topic1970
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
 
   $ hg topics --age
-     topic2010 (2010-01-01 by bar)
-     topic1990 (1990-01-01 by foo)
-   * topic1970 (1970-01-01 by test)
+     topic2010 (2010-01-01 by bar, 1 changesets)
+     topic1990 (1990-01-01 by foo, 1 changesets)
+   * topic1970 (1970-01-01 by test, 1 changesets)
 
   $ hg topics --age random
   abort: cannot use --age while setting a topic