comparison tests/test-namespaces.t @ 6487:963471ebe26a

topic: make topic namespace use string "none" as the default/empty value The rationale is to not let topic namespaces be confused with neither default branch nor the actual default namespace value (which is planned to be configurable, but probably will be local user name by default).
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 19 May 2023 10:08:19 -0300
parents 43166bd57d6c
children 3f30aaa067ba
comparison
equal deleted inserted replaced
6486:0c503c521ba5 6487:963471ebe26a
18 18
19 $ hg branches 19 $ hg branches
20 20
21 $ hg debug-topic-namespace --clear 21 $ hg debug-topic-namespace --clear
22 $ hg debug-topic-namespaces 22 $ hg debug-topic-namespaces
23 default 23 none
24 24
25 $ hg debugtopicnamespace --clear nonsense 25 $ hg debugtopicnamespace --clear nonsense
26 abort: cannot use --clear when setting a topic namespace 26 abort: cannot use --clear when setting a topic namespace
27 [255] 27 [255]
28 28
51 Updating to a revision with a namespace should activate it 51 Updating to a revision with a namespace should activate it
52 52
53 $ hg up null 53 $ hg up null
54 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 54 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
55 $ hg debug-topic-namespace 55 $ hg debug-topic-namespace
56 default 56 none
57 $ hg topics 57 $ hg topics
58 feature (1 changesets) 58 feature (1 changesets)
59 $ hg up 0 59 $ hg up 0
60 switching to topic-namespace alice 60 switching to topic-namespace alice
61 switching to topic feature 61 switching to topic feature
102 [foo/bar] <user26> (feature) 102 [foo/bar] <user26> (feature)
103 103
104 no double slashes means it's a named branch 104 no double slashes means it's a named branch
105 $ hg debug-parse-fqbn foo/bar 105 $ hg debug-parse-fqbn foo/bar
106 branch: foo/bar 106 branch: foo/bar
107 namespace: default 107 namespace: none
108 topic: 108 topic:
109 109
110 Formatting 110 Formatting
111 111
112 $ hg debugformatfqbn -b branch -n namespace -t topic 112 $ hg debugformatfqbn -b branch -n namespace -t topic
118 $ hg debug-format-fqbn -b foo/bar -n user26 -t feature 118 $ hg debug-format-fqbn -b foo/bar -n user26 -t feature
119 foo/bar//user26/feature 119 foo/bar//user26/feature
120 120
121 default values 121 default values
122 122
123 $ hg debug-format-fqbn -b default -n default -t '' --no-short 123 $ hg debug-format-fqbn -b default -n none -t '' --no-short
124 default//default/ 124 default//none/
125 $ hg debug-format-fqbn -b default -n default -t '' --short 125 $ hg debug-format-fqbn -b default -n none -t '' --short
126 default 126 default
127 127
128 $ hg debug-format-fqbn -b default -n namespace -t '' --no-short 128 $ hg debug-format-fqbn -b default -n namespace -t '' --no-short
129 default//namespace/ 129 default//namespace/
130 $ hg debug-format-fqbn -b default -n namespace -t '' --short 130 $ hg debug-format-fqbn -b default -n namespace -t '' --short
131 default//namespace/ 131 default//namespace/
132 132
133 $ hg debug-format-fqbn -b default -n default -t topic --no-short 133 $ hg debug-format-fqbn -b default -n none -t topic --no-short
134 default//default/topic 134 default//none/topic
135 $ hg debug-format-fqbn -b default -n default -t topic --short 135 $ hg debug-format-fqbn -b default -n none -t topic --short
136 default//topic 136 default//topic
137 137
138 $ cd .. 138 $ cd ..