comparison tests/test-namespaces.t @ 6536:90b631fde2d7 stable

topic: only set topic on workingcommitctx if it doesn't already have one This fix is so obvious, that I wonder, if this is the correct thing to do, why wasn't it done like this from the beginning. Despite my doubts, all the tests pass.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 17 Jul 2023 15:52:39 -0300
parents 43166bd57d6c
children ca1c219bd59f
comparison
equal deleted inserted replaced
6529:ce67a138c5d6 6536:90b631fde2d7
69 69
70 $ hg up alice 70 $ hg up alice
71 abort: unknown revision 'alice' 71 abort: unknown revision 'alice'
72 [10] 72 [10]
73 73
74 Export/import of topic namespaces
75
76 $ hg export
77 # HG changeset patch
78 # User test
79 # Date 0 0
80 # Thu Jan 01 00:00:00 1970 +0000
81 # Branch stable
82 # Node ID 69c7dbf6acd180eeec055dd67933badd3601d45f
83 # Parent 0000000000000000000000000000000000000000
84 # EXP-Topic feature
85 a
86
87 diff -r 000000000000 -r 69c7dbf6acd1 a
88 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
89 +++ b/a Thu Jan 01 00:00:00 1970 +0000
90 @@ -0,0 +1,1 @@
91 +a
92
93 $ hg import - << EOF
94 > # HG changeset patch
95 > # User test
96 > # Date 0 0
97 > # Thu Jan 01 00:00:00 1970 +0000
98 > # Branch another-branch
99 > # Node ID 94981e5d988ea23cf2b17f6c07c39edc0f174b01
100 > # Parent d6d47657e765570283ec03fc68836d9eb297c4b3
101 > # EXP-Topic mytopic
102 > added z
103 >
104 > diff --git a/z b/z
105 > new file mode 100644
106 > --- /dev/null
107 > +++ b/z
108 > @@ -0,0 +1,1 @@
109 > +z
110 > EOF
111 applying patch from stdin
112
113 $ hg log -r tip -T '{rev}: {branch} {topic_namespace} {topic}\n'
114 1: stable alice mytopic
115
116 $ hg log -r tip -T '{rev}: {fqbn}\n'
117 1: stable//alice/mytopic
118
74 Revsets 119 Revsets
75 120
76 $ nslog() { 121 $ nslog() {
77 > hg log -T '{rev}: {topic_namespace}\n' -r "$1" 122 > hg log -T '{rev}: {topic_namespace}\n' -r "$1"
78 > } 123 > }
79 124
80 $ nslog 'topicnamespace(:)' 125 $ nslog 'topicnamespace(:)'
81 0: alice 126 0: alice
127 1: alice
82 $ nslog 'topicnamespace(all())' 128 $ nslog 'topicnamespace(all())'
83 0: alice 129 0: alice
130 1: alice
84 $ nslog 'topicnamespace(topicnamespace("alice"))' 131 $ nslog 'topicnamespace(topicnamespace("alice"))'
85 0: alice 132 0: alice
133 1: alice
86 $ nslog 'topicnamespace(wdir())' 134 $ nslog 'topicnamespace(wdir())'
87 0: alice 135 0: alice
136 1: alice
88 $ nslog 'topicnamespace("re:ice$")' 137 $ nslog 'topicnamespace("re:ice$")'
89 0: alice 138 0: alice
139 1: alice
90 $ nslog 'topicnamespace(nonsense)' 140 $ nslog 'topicnamespace(nonsense)'
91 abort: unknown revision 'nonsense' 141 abort: unknown revision 'nonsense'
92 [10] 142 [10]
93 143
94 $ nslog 'topicnamespace("re:nonsense")' 144 $ nslog 'topicnamespace("re:nonsense")'