diff hgext3rd/topic/revset.py @ 6533:3d16c9a8cf3a

topic: update topic namespace revset to use "none" as the default/empty value Follow-up for 963471ebe26a.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 17 Jul 2023 14:34:59 -0300
parents 963471ebe26a
children 8a51498b9976
line wrap: on
line diff
--- a/hgext3rd/topic/revset.py	Thu Jul 06 14:49:54 2023 -0300
+++ b/hgext3rd/topic/revset.py	Mon Jul 17 14:34:59 2023 -0300
@@ -35,7 +35,7 @@
     mutable = revset._notpublic(repo, revset.fullreposet(repo), ())
 
     if not args:
-        return (subset & mutable).filter(lambda r: repo[r].topic_namespace() != b'default')
+        return (subset & mutable).filter(lambda r: repo[r].topic_namespace() != b'none')
 
     try:
         tns = getstringstrict(args[0], b'')
@@ -50,7 +50,7 @@
 
         def matches(r):
             tns = repo[r].topic_namespace()
-            if tns == b'default':
+            if tns == b'none':
                 return False
             return matcher(tns)
 
@@ -58,11 +58,11 @@
 
     s = revset.getset(repo, revset.fullreposet(repo), x)
     namespaces = {repo[r].topic_namespace() for r in s}
-    namespaces.discard(b'default')
+    namespaces.discard(b'none')
 
     def matches(r):
         tns = repo[r].topic_namespace()
-        if tns == b'default':
+        if tns == b'none':
             return False
         return tns in namespaces