# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1498681706 -19800 # Node ID aa4db71a6224fdb6d09668e9b76dccc5800cce88 # Parent d5eb5269128ac9bfd3d52f0008a066134bd5b71d topics: return a parse error if stack() revset is passed with argument diff -r d5eb5269128a -r aa4db71a6224 hgext3rd/topic/revset.py --- a/hgext3rd/topic/revset.py Thu Jun 29 00:11:07 2017 +0530 +++ b/hgext3rd/topic/revset.py Thu Jun 29 01:58:26 2017 +0530 @@ -71,6 +71,8 @@ This is roughly equivalent to 'topic(.) - obsolete' with a sorting moving unstable changeset after there future parent (as if evolve where already run).""" + err = 'stack() takes no argument, it works on current topic' + revset.getargs(x, 0, 0, err) topic = repo.currenttopic if not topic: raise error.Abort(_('no active topic to list')) diff -r d5eb5269128a -r aa4db71a6224 tests/test-topic-stack.t --- a/tests/test-topic-stack.t Thu Jun 29 00:11:07 2017 +0530 +++ b/tests/test-topic-stack.t Thu Jun 29 01:58:26 2017 +0530 @@ -216,6 +216,14 @@ 4 default {foo} draft c_e 5 default {foo} draft c_f + $ hg log -r 'stack(foo)' + hg: parse error: stack() takes no argument, it works on current topic + [255] + + $ hg log -r 'stack(foobar)' + hg: parse error: stack() takes no argument, it works on current topic + [255] + Case with multiple heads on the topic -------------------------------------