src/topic/__init__.py
changeset 1857 a506ed8ab8da
parent 1856 7d7f5f9e2f8c
child 1858 4ab1b854ce4e
--- a/src/topic/__init__.py	Thu Jun 18 15:46:26 2015 -0400
+++ b/src/topic/__init__.py	Mon Jun 15 16:56:44 2015 -0500
@@ -63,10 +63,11 @@
         def currenttopic(self):
             return self.vfs.tryread('topic')
 
+    repo.__class__ = topicrepo
     if util.safehasattr(repo, 'names'):
         repo.names.addnamespace(namespaces.namespace(
-            'topics', 'topic', namemap=_namemap, nodemap=_nodemap))
-    repo.__class__ = topicrepo
+            'topics', 'topic', namemap=_namemap, nodemap=_nodemap,
+            listnames=lambda repo: repo.topics))
 
 @command('topics [TOPIC]', [
     ('', 'clear', False, 'clear active topic if any'),