Mercurial > evolve
comparison hgext3rd/topic/stack.py @ 3061:6f87042766cb stable
topic: remove a silly duplicate in a revset
Spotted by Pulkit Goyal. More performance win seems to exists here, but we
starts with the obvious.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 13 Oct 2017 20:28:21 +0200 |
parents | b185beb94df5 |
children | 144989dabe93 |
comparison
equal
deleted
inserted
replaced
3058:adfc936dff63 | 3061:6f87042766cb |
---|---|
32 self.topic = topic | 32 self.topic = topic |
33 self.behinderror = None | 33 self.behinderror = None |
34 if topic is not None and branch is not None: | 34 if topic is not None and branch is not None: |
35 raise error.ProgrammingError('both branch and topic specified (not defined yet)') | 35 raise error.ProgrammingError('both branch and topic specified (not defined yet)') |
36 elif topic is not None: | 36 elif topic is not None: |
37 trevs = repo.revs("not obsolete() and topic(%s) - obsolete()", topic) | 37 trevs = repo.revs("not obsolete() and topic(%s)", topic) |
38 elif branch is not None: | 38 elif branch is not None: |
39 trevs = repo.revs("not public() and branch(%s) - obsolete() - topic()", branch) | 39 trevs = repo.revs("not public() and branch(%s) - obsolete() - topic()", branch) |
40 else: | 40 else: |
41 raise error.ProgrammingError('neither branch and topic specified (not defined yet)') | 41 raise error.ProgrammingError('neither branch and topic specified (not defined yet)') |
42 self._revs = trevs | 42 self._revs = trevs |