comparison hgext3rd/topic/stack.py @ 3044:b185beb94df5 stable

topic: reorder revset for faster evaluation When running the revset on unfiltered repository, the mutable set can get huge. So removing the obsolete changeset first provide a large speedup. This resolve the performance regression we were seeing since the 6.7.0 release.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2017 15:47:11 +0200
parents a61634f52742
children 6f87042766cb
comparison
equal deleted inserted replaced
3043:033e00be9ce4 3044:b185beb94df5
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("topic(%s) - obsolete()", topic) 37 trevs = repo.revs("not obsolete() and topic(%s) - obsolete()", topic)
38 elif branch is not None: 38 elif branch is not None:
39 trevs = repo.revs("branch(%s) - public() - 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
43 43
44 def __iter__(self): 44 def __iter__(self):