hgext3rd/topic/stack.py
changeset 2627 42abd3bd30ee
parent 2626 bc36a608e9e4
child 2632 62eb5a2d2112
--- a/hgext3rd/topic/stack.py	Mon Jun 19 02:50:35 2017 +0530
+++ b/hgext3rd/topic/stack.py	Mon Jun 19 03:13:35 2017 +0530
@@ -22,6 +22,10 @@
     return ' '.join(prefix % suffix for suffix in labelssuffix)
 
 def showstack(ui, repo, topic, opts):
+
+    if topic not in repo.topics:
+        raise error.Abort(_('cannot resolve "%s": no such topic found') % topic)
+
     fm = ui.formatter('topicstack', opts)
     prev = None
     entries = []