changeset 6489:71a8d4db4f55

topic: don't show "none" in the list of topic namespaces
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 23 May 2023 11:09:06 -0300
parents 3f30aaa067ba
children 24f1f34b4a5e
files hgext3rd/topic/__init__.py tests/test-namespaces.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Tue May 23 11:08:24 2023 -0300
+++ b/hgext3rd/topic/__init__.py	Tue May 23 11:09:06 2023 -0300
@@ -568,9 +568,10 @@
         def topic_namespaces(self):
             if self._topic_namespaces is not None:
                 return self._topic_namespaces
-            namespaces = set([self.currenttns])
+            namespaces = set([b'none', self.currenttns])
             for c in self.set(b'not public()'):
                 namespaces.add(c.topic_namespace())
+            namespaces.remove(b'none')
             self._topic_namespaces = namespaces
             return namespaces
 
--- a/tests/test-namespaces.t	Tue May 23 11:08:24 2023 -0300
+++ b/tests/test-namespaces.t	Tue May 23 11:09:06 2023 -0300
@@ -20,7 +20,6 @@
 
   $ hg debug-topic-namespace --clear
   $ hg debug-topic-namespaces
-  none
 
   $ hg topics