src/topic/__init__.py
changeset 1842 94bbc18daa99
parent 1841 72a58a5bfb62
child 1843 0ba067a97d06
--- a/src/topic/__init__.py	Wed Jun 10 14:59:46 2015 -0400
+++ b/src/topic/__init__.py	Wed Jun 10 15:01:36 2015 -0400
@@ -14,6 +14,7 @@
 from mercurial import commands
 from mercurial import extensions
 from mercurial import namespaces
+from mercurial import obsolete
 from mercurial import phases
 from mercurial import util
 
@@ -62,6 +63,9 @@
 ])
 def topics(ui, repo, topic=None, clear=False):
     """View current topic, set current topic, or see all topics."""
+    if not obsolete.isenabled(repo, obsolete.createmarkersopt):
+        raise util.Abort('current reality means you should only '
+                         'use topic with obsolete enabled')
     if clear:
         if repo.vfs.exists('topic'):
             repo.vfs.unlink('topic')