changeset 2657:58719183d383

topic: improve the revset used to return name->nodes mapping The 'topic' version already filters public changeset out, and skipping 'changectx' creation will helps performance.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 23 Jun 2017 10:51:18 +0200
parents 4a148ca3e80d
children a51970c07492
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Jun 22 09:48:40 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Fri Jun 23 10:51:18 2017 +0200
@@ -138,8 +138,8 @@
         return [repo[r].node()]
     if name not in repo.topics:
         return []
-    return [ctx.node() for ctx in
-            repo.set('not public() and topic(%s)', name)]
+    node = repo.changelog.node
+    return [node(rev) for rev in repo.revs('topic(%s)', name)]
 
 def _nodemap(repo, node):
     ctx = repo[node]