diff tests/test-namespaces.t @ 6552:81e89d943a4e

topic: pretend changeset has no topic namespace if it doesn't have a topic We only need this in case commit extras have topic namespace and no topic. Which is now prevented from happening by an earlier patch.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 20 Jun 2023 12:30:24 -0300
parents 198b87917ba8
children ae7c75c43f92
line wrap: on
line diff
--- a/tests/test-namespaces.t	Wed Sep 06 16:03:01 2023 -0300
+++ b/tests/test-namespaces.t	Tue Jun 20 12:30:24 2023 -0300
@@ -5,22 +5,39 @@
   $ hg init repo
   $ cd repo
 
+Setting a topic namespace alone doesn't affect wdir()
+
   $ hg debug-topic-namespace space-name
   marked working directory as topic namespace: space-name
   $ hg debug-topic-namespaces
   space-name
 
   $ hg log -r 'wdir()' -T '{topic_namespace}\n'
+  none
+
+  $ hg log -r 'wdir()' -T '{fqbn}\n'
+  default
+
+But after setting a topic the already-set namespace is visible on wdir()
+
+  $ hg topic feature
+  marked working directory as topic: feature
+  $ hg topics
+   * feature (0 changesets)
+
+  $ hg log -r 'wdir()' -T '{topic_namespace}\n'
   space-name
 
   $ hg log -r 'wdir()' -T '{fqbn}\n'
-  default//space-name/
+  default//space-name/feature
 
   $ hg branches
 
   $ hg debug-topic-namespace --clear
   $ hg debug-topic-namespaces
 
+  $ hg topic --clear
+  clearing empty topic "feature"
   $ hg topics
 
   $ hg debugtopicnamespace --clear nonsense