80 def ngtipset(repo, subset, x): |
80 def ngtipset(repo, subset, x): |
81 """The untopiced tip. |
81 """The untopiced tip. |
82 |
82 |
83 Name is horrible so that people change it. |
83 Name is horrible so that people change it. |
84 """ |
84 """ |
85 args = revset.getargs(x, 1, 1, 'topic takes one') |
85 args = revset.getargs(x, 1, 1, 'ngtip takes one argument') |
86 # match a specific topic |
86 # match a specific topic |
87 branch = revset.getstring(args[0], 'ngtip() argument must be a string') |
87 branch = revset.getstring(args[0], 'ngtip requires a string') |
88 if branch == '.': |
88 if branch == '.': |
89 branch = repo['.'].branch() |
89 branch = repo['.'].branch() |
90 return subset & revset.baseset(destination.ngtip(repo, branch)) |
90 return subset & revset.baseset(destination.ngtip(repo, branch)) |
91 |
91 |
92 @revsetpredicate('stack()') |
92 @revsetpredicate('stack()') |
93 def stackset(repo, subset, x): |
93 def stackset(repo, subset, x): |
94 """All relevant changes in the current topic, |
94 """All relevant changes in the current topic, |
95 |
95 |
96 This is roughly equivalent to 'topic(.) - obsolete' with a sorting moving |
96 This is roughly equivalent to 'topic(.) - obsolete' with a sorting moving |
97 unstable changeset after there future parent (as if evolve where already |
97 unstable changeset after there future parent (as if evolve where already |
98 run).""" |
98 run). |
99 err = 'stack() takes no argument, it works on current topic' |
99 """ |
|
100 err = 'stack takes no arguments, it works on current topic' |
100 revset.getargs(x, 0, 0, err) |
101 revset.getargs(x, 0, 0, err) |
101 topic = None |
102 topic = None |
102 branch = None |
103 branch = None |
103 if repo.currenttopic: |
104 if repo.currenttopic: |
104 topic = repo.currenttopic |
105 topic = repo.currenttopic |