diff tests/test-topic-stack.t @ 4322:41f38bf15b4c

topic: make revsets like 'foo#stack[0]' work 'stack' relation subscript function is another way to refer to s0, s1, etc. But instead of aborting in many cases it will simply return an empty set.
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 16 Dec 2018 11:22:04 +0800
parents b8cb1bdbc8d7
children a71f2271ed76 5da1d162ad50
line wrap: on
line diff
--- a/tests/test-topic-stack.t	Sat Dec 22 01:29:59 2018 -0500
+++ b/tests/test-topic-stack.t	Sun Dec 16 11:22:04 2018 +0800
@@ -373,6 +373,17 @@
   hg: parse error: stack takes no arguments, it works on current topic
   [255]
 
+Stack relation subscript:
+
+  $ hg log -r 'foo#stack[0]'
+  1 default {} public c_b
+  $ hg log -r 's0 and foo#stack[0]'
+  1 default {} public c_b
+  $ hg log -r 'foo#stack[4]'
+  5 default {foo} draft c_f
+  $ hg log -r 's4 and foo#stack[4]'
+  5 default {foo} draft c_f
+
 Case with multiple heads on the topic
 -------------------------------------