Mercurial > evolve
comparison tests/test-topic-prev-next.t @ 5883:24bfb5c7bf7a stable
next: filter unstable targets by topic only when there's no --no-topic
Otherwise --no-topic makes no difference in how hg next works with unstable
targets.
Now that aspchildren filtering code actually works, this patch makes hg next
behave correctly when dealing with unstable changesets with a different topic.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 22 Apr 2021 17:18:37 +0800 |
parents | |
children | 21a8f0336f26 |
comparison
equal
deleted
inserted
replaced
5882:1d8148795dc2 | 5883:24bfb5c7bf7a |
---|---|
1 $ . "$TESTDIR/testlib/topic_setup.sh" | |
2 $ . "$TESTDIR/testlib/common.sh" | |
3 | |
4 $ cat << EOF >> $HGRCPATH | |
5 > [extensions] | |
6 > evolve = | |
7 > [ui] | |
8 > logtemplate = '{rev} [{topic}] {desc}\n' | |
9 > EOF | |
10 | |
11 Making sure plain hg next sticks to topic when target is unstable | |
12 | |
13 $ hg init next-unstable-topic | |
14 $ cd next-unstable-topic | |
15 | |
16 $ mkcommit ROOT | |
17 $ hg topics topic-a | |
18 marked working directory as topic: topic-a | |
19 $ mkcommit A | |
20 active topic 'topic-a' grew its first changeset | |
21 (see 'hg help topics' for more information) | |
22 $ hg topics topic-b | |
23 $ mkcommit B | |
24 active topic 'topic-b' grew its first changeset | |
25 (see 'hg help topics' for more information) | |
26 $ hg up 'topic("topic-a")' | |
27 switching to topic topic-a | |
28 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
29 $ echo foo > foo | |
30 $ hg ci -A --amend | |
31 adding foo | |
32 1 new orphan changesets | |
33 $ hg log -G | |
34 @ 3 [topic-a] A | |
35 | | |
36 | * 2 [topic-b] B | |
37 | | | |
38 | x 1 [topic-a] A | |
39 |/ | |
40 o 0 [] ROOT | |
41 | |
42 | |
43 $ hg next | |
44 no children on topic "topic-a" | |
45 do you want --no-topic | |
46 [1] | |
47 | |
48 $ hg next --no-topic | |
49 move:[2] B | |
50 atop:[3] A | |
51 working directory is now at 53f8332d648f | |
52 | |
53 $ cd .. |