Mercurial > evolve
comparison tests/test-topic-server.t @ 5150:e0c091b199bc stable
topic: extend topic gating to descendant
If a changeset with topic as descendant without topic, we need to exclude them
too when using: topic.server-gate-topic-changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 04 Mar 2020 17:08:05 +0100 |
parents | 19b8ffd23795 |
children | a7fb433faab6 0828951543f8 |
comparison
equal
deleted
inserted
replaced
5149:3f40b39d091e | 5150:e0c091b199bc |
---|---|
97 $ hg up 0 | 97 $ hg up 0 |
98 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 98 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
99 $ echo c > c | 99 $ echo c > c |
100 $ hg commit -Am 'adding c (no topic)' | 100 $ hg commit -Am 'adding c (no topic)' |
101 adding c | 101 adding c |
102 $ hg up some-work | |
103 switching to topic some-work | |
104 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
105 $ hg topic --clear | |
106 $ echo d > d | |
107 $ hg commit -Am 'adding d (no topic)' | |
108 adding d | |
109 created new head | |
110 (consider using topic for lightweight branches. See 'hg help topic') | |
102 $ hg log -r 'all() - 0' | 111 $ hg log -r 'all() - 0' |
103 changeset: 1:2a2e8b3520f2 | 112 changeset: 1:2a2e8b3520f2 |
104 topic: some-work | 113 topic: some-work |
105 user: test | 114 user: test |
106 date: Thu Jan 01 00:00:00 1970 +0000 | 115 date: Thu Jan 01 00:00:00 1970 +0000 |
107 summary: adding b (topic) | 116 summary: adding b (topic) |
108 | 117 |
109 changeset: 2:b46feb4d24f9 | 118 changeset: 2:b46feb4d24f9 |
119 parent: 0:6569b5a81c7e | |
120 user: test | |
121 date: Thu Jan 01 00:00:00 1970 +0000 | |
122 summary: adding c (no topic) | |
123 | |
124 changeset: 3:be22ca6e89ea | |
110 tag: tip | 125 tag: tip |
111 parent: 0:6569b5a81c7e | 126 parent: 1:2a2e8b3520f2 |
112 user: test | 127 user: test |
113 date: Thu Jan 01 00:00:00 1970 +0000 | 128 date: Thu Jan 01 00:00:00 1970 +0000 |
114 summary: adding c (no topic) | 129 summary: adding d (no topic) |
115 | 130 |
116 | 131 |
117 (disable the bare publishing to put a bare draft on the server) | 132 (disable the bare publishing to put a bare draft on the server) |
118 | 133 |
119 $ cat << EOF >> ../server/.hg/hgrc | 134 $ cat << EOF >> ../server/.hg/hgrc |
120 > [experimental] | 135 > [experimental] |
121 > topic.publish-bare-branch = no | 136 > topic.publish-bare-branch = no |
122 > EOF | 137 > EOF |
123 $ hg push | 138 $ hg push --force |
124 pushing to ssh://user@dummy/server | 139 pushing to ssh://user@dummy/server |
125 searching for changes | 140 searching for changes |
126 remote: adding changesets | 141 remote: adding changesets |
127 remote: adding manifests | 142 remote: adding manifests |
128 remote: adding file changes | 143 remote: adding file changes |
129 remote: added 2 changesets with 2 changes to 2 files (+1 heads) | 144 remote: added 3 changesets with 3 changes to 3 files (+1 heads) |
130 $ cd .. | 145 $ cd .. |
131 $ hg --cwd server phase -r 'tip' | 146 $ hg --cwd server phase -r 'tip' |
132 2: draft | 147 3: draft |
133 | 148 |
134 Clients with topic can exchange draft changesets both with and without a topic through the server | 149 Clients with topic can exchange draft changesets both with and without a topic through the server |
135 | 150 |
136 $ hg --cwd client-topic2 pull | 151 $ hg --cwd client-topic2 pull |
137 pulling from ssh://user@dummy/server | 152 pulling from ssh://user@dummy/server |
138 searching for changes | 153 searching for changes |
139 adding changesets | 154 adding changesets |
140 adding manifests | 155 adding manifests |
141 adding file changes | 156 adding file changes |
142 added 2 changesets with 2 changes to 2 files (+1 heads) | 157 added 3 changesets with 3 changes to 3 files (+1 heads) |
143 new changesets 2a2e8b3520f2:b46feb4d24f9 (2 drafts) | 158 new changesets 2a2e8b3520f2:be22ca6e89ea (3 drafts) |
144 (run 'hg heads' to see heads) | 159 (run 'hg heads' to see heads, 'hg merge' to merge) |
145 $ hg --cwd client-topic2 log -r 'all() - 0' | 160 $ hg --cwd client-topic2 log -r 'all() - 0' |
146 changeset: 1:2a2e8b3520f2 | 161 changeset: 1:2a2e8b3520f2 |
147 topic: some-work | 162 topic: some-work |
148 user: test | 163 user: test |
149 date: Thu Jan 01 00:00:00 1970 +0000 | 164 date: Thu Jan 01 00:00:00 1970 +0000 |
150 summary: adding b (topic) | 165 summary: adding b (topic) |
151 | 166 |
152 changeset: 2:b46feb4d24f9 | 167 changeset: 2:b46feb4d24f9 |
168 parent: 0:6569b5a81c7e | |
169 user: test | |
170 date: Thu Jan 01 00:00:00 1970 +0000 | |
171 summary: adding c (no topic) | |
172 | |
173 changeset: 3:be22ca6e89ea | |
153 tag: tip | 174 tag: tip |
154 parent: 0:6569b5a81c7e | 175 parent: 1:2a2e8b3520f2 |
155 user: test | 176 user: test |
156 date: Thu Jan 01 00:00:00 1970 +0000 | 177 date: Thu Jan 01 00:00:00 1970 +0000 |
157 summary: adding c (no topic) | 178 summary: adding d (no topic) |
158 | 179 |
159 | 180 |
160 Client without topic only sees draft changesets if they don't have a topic | 181 Client without topic only sees draft changesets if they don't have a topic |
161 | 182 |
162 $ hg --cwd client-plain pull | 183 $ hg --cwd client-plain pull |