diff src/topic/__init__.py @ 1851:67d53e8e0c1a

topic: only require obsolete support for --change
author Matt Mackall <mpm@selenic.com>
date Wed, 10 Jun 2015 17:40:50 -0500
parents 0da6bf86b718
children 3084687f7994
line wrap: on
line diff
--- a/src/topic/__init__.py	Wed Jun 10 17:13:15 2015 -0500
+++ b/src/topic/__init__.py	Wed Jun 10 17:40:50 2015 -0500
@@ -71,10 +71,9 @@
 ])
 def topics(ui, repo, topic=None, clear=False, change=None):
     """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 change:
+        if not obsolete.isenabled(repo, obsolete.createmarkersopt):
+            raise util.Abort(_('must have obsolete enabled to use --change'))
         if topic is None and not clear:
             raise util.Abort('changing topic requires a topic name or --clear')
         if any(not c.mutable() for c in repo.set('%r and public()', change)):