comparison hgext3rd/topic/__init__.py @ 2652:839c2879edcc

topic: use the 'topic' revset in namespace This revset performance just got improved.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 22 Jun 2017 09:47:14 +0200
parents cf930521f14d
children 13313d0cab71
comparison
equal deleted inserted replaced
2651:6a3df2404472 2652:839c2879edcc
136 raise error.Abort(msg % (name, topic, len(revs))) 136 raise error.Abort(msg % (name, topic, len(revs)))
137 return [repo[r].node()] 137 return [repo[r].node()]
138 if name not in repo.topics: 138 if name not in repo.topics:
139 return [] 139 return []
140 return [ctx.node() for ctx in 140 return [ctx.node() for ctx in
141 repo.set('not public() and extra(topic, %s)', name)] 141 repo.set('not public() and topic(%s)', name)]
142 142
143 def _nodemap(repo, node): 143 def _nodemap(repo, node):
144 ctx = repo[node] 144 ctx = repo[node]
145 t = ctx.topic() 145 t = ctx.topic()
146 if t and ctx.phase() > phases.public: 146 if t and ctx.phase() > phases.public: