Mercurial > evolve
comparison tests/test-topic-mode.t @ 3030:581a6b9d2c8c
test: add support for random-all topic mode
The 'random' mode no longer generate a random topic for merge.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 01 Oct 2017 11:13:38 +0100 |
parents | 402bfc232ce9 |
children | b400759fd6d2 |
comparison
equal
deleted
inserted
replaced
3029:402bfc232ce9 | 3030:581a6b9d2c8c |
---|---|
216 | 216 |
217 $ touch B | 217 $ touch B |
218 $ hg add B | 218 $ hg add B |
219 $ hg commit -m "Add B" --config devel.randomseed=128 | 219 $ hg commit -m "Add B" --config devel.randomseed=128 |
220 active topic 'various-dove' grew its first changeset | 220 active topic 'various-dove' grew its first changeset |
221 | |
222 Test a merge too | |
223 | |
224 $ hg phase --public -r . | |
225 active topic 'various-dove' is now empty | |
226 $ hg up default | |
227 clearing empty topic "various-dove" | |
228 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
229 $ hg log -G | |
230 @ changeset: 2:2d2acb6efad5 | |
231 | tag: tip | |
232 | parent: 0:ec1d2790416d | |
233 | user: test | |
234 | date: Thu Jan 01 00:00:00 1970 +0000 | |
235 | summary: Add B | |
236 | | |
237 | o changeset: 1:d4b548f35972 | |
238 |/ topic: panoramic-antelope | |
239 | user: test | |
240 | date: Thu Jan 01 00:00:00 1970 +0000 | |
241 | summary: Add A | |
242 | | |
243 o changeset: 0:ec1d2790416d | |
244 user: test | |
245 date: Thu Jan 01 00:00:00 1970 +0000 | |
246 summary: ROOT | |
247 | |
248 $ hg merge panoramic-antelope | |
249 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 (branch merge, don't forget to commit) | |
251 $ hg ci -m 'merge' | |
252 Testing the config knob to use a random topic for untopic commit (even for merge) | |
253 ================================================================================= | |
254 | |
255 $ hg init $TESTTMP/test-untopic-random-all | |
256 $ cd $TESTTMP/test-untopic-random-all | |
257 $ cat <<EOF >> .hg/hgrc | |
258 > [phases] | |
259 > publish=false | |
260 > EOF | |
261 $ cat <<EOF >> $HGRCPATH | |
262 > [experimental] | |
263 > topic-mode = random-all | |
264 > EOF | |
265 | |
266 $ touch ROOT | |
267 $ hg commit -A -m "ROOT" --config experimental.topic-mode=off | |
268 adding ROOT | |
269 | |
270 $ touch A | |
271 $ hg add A | |
272 $ hg commit -m "Add A" --config devel.randomseed=42 | |
273 active topic 'panoramic-antelope' grew its first changeset | |
274 | |
275 $ hg up -r "desc(ROOT)" | |
276 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
277 | |
278 $ touch B | |
279 $ hg add B | |
280 $ hg commit -m "Add B" --config devel.randomseed=128 | |
281 active topic 'various-dove' grew its first changeset | |
282 | |
283 Test a merge too | |
284 | |
285 $ hg phase --public -r . | |
286 active topic 'various-dove' is now empty | |
287 $ hg up default | |
288 clearing empty topic "various-dove" | |
289 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
290 $ hg log -G | |
291 @ changeset: 2:2d2acb6efad5 | |
292 | tag: tip | |
293 | parent: 0:ec1d2790416d | |
294 | user: test | |
295 | date: Thu Jan 01 00:00:00 1970 +0000 | |
296 | summary: Add B | |
297 | | |
298 | o changeset: 1:d4b548f35972 | |
299 |/ topic: panoramic-antelope | |
300 | user: test | |
301 | date: Thu Jan 01 00:00:00 1970 +0000 | |
302 | summary: Add A | |
303 | | |
304 o changeset: 0:ec1d2790416d | |
305 user: test | |
306 date: Thu Jan 01 00:00:00 1970 +0000 | |
307 summary: ROOT | |
308 | |
309 $ hg merge panoramic-antelope | |
310 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
311 (branch merge, don't forget to commit) | |
312 $ hg ci -m 'merge' --config devel.randomseed=1337 | |
313 active topic 'omniscient-locust' grew its first changeset |