hgext3rd/topic/revset.py
changeset 4063 00c65abf99cd
parent 4061 ad4194399b47
child 4064 a2c0133006c6
--- a/hgext3rd/topic/revset.py	Sat Sep 01 21:45:15 2018 +0200
+++ b/hgext3rd/topic/revset.py	Sat Sep 01 21:47:00 2018 +0200
@@ -23,6 +23,11 @@
 
 revsetpredicate = registrar.revsetpredicate()
 
+def getstringstrict(x, err):
+    if x and (x[0] == 'string'):
+        return x[1]
+    raise error.ParseError(err)
+
 @revsetpredicate('topic([string or set])')
 def topicset(repo, subset, x):
     """All changesets with the specified topic or the topics of the given
@@ -39,7 +44,7 @@
         return (subset & mutable).filter(lambda r: bool(repo[r].topic()))
 
     try:
-        topic = revset.getstring(args[0], '')
+        topic = getstringstrict(args[0], '')
     except error.ParseError:
         # not a string, but another revset
         pass