Mercurial > evolve
changeset 3156:31493a1b0e39
revset: clean up some messy logic
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 15 Oct 2017 00:07:21 +0530 |
parents | b237c1c6dc19 |
children | f286eefbd20d |
files | hgext3rd/topic/revset.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/revset.py Thu Oct 26 09:03:48 2017 +0200 +++ b/hgext3rd/topic/revset.py Sun Oct 15 00:07:21 2017 +0530 @@ -72,11 +72,10 @@ run).""" err = 'stack() takes no argument, it works on current topic' revset.getargs(x, 0, 0, err) - topic = repo.currenttopic topic = None branch = None - if not topic and repo.currenttopic: + if repo.currenttopic: topic = repo.currenttopic - if not topic: + else: branch = repo[None].branch() return revset.baseset(stack.stack(repo, branch=branch, topic=topic)[1:]) & subset