Mercurial > evolve
annotate tests/test-topic-issue6406.t @ 6654:968b9651b1f7 stable
tests: demonstrate hg pick currently ignoring active topic (issue6406)
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 13 Dec 2023 15:44:30 -0300 |
parents | |
children | 81fe0a498447 |
rev | line source |
---|---|
6654
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
1 hg pick with no active topic and with a different active topic (issue6406) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
2 https://bz.mercurial-scm.org/show_bug.cgi?id=6406 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
3 For prior discussions on this behavior see also |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
4 https://foss.heptapod.net/mercurial/evolve/-/merge_requests/313 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
5 https://foss.heptapod.net/mercurial/evolve/-/merge_requests/390 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
6 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
7 $ . "$TESTDIR/testlib/common.sh" |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
8 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
9 $ cat << EOF >> "$HGRCPATH" |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
10 > [phases] |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
11 > publish = no |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
12 > [extensions] |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
13 > evolve = |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
14 > topic = |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
15 > EOF |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
16 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
17 #testcases inmemory ondisk |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
18 #if inmemory |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
19 $ cat >> $HGRCPATH <<EOF |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
20 > [experimental] |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
21 > evolution.in-memory = yes |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
22 > EOF |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
23 #endif |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
24 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
25 $ hg init issue6406 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
26 $ cd issue6406 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
27 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
28 $ mkcommit ROOT |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
29 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
30 $ hg debug-topic-namespace aaa |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
31 marked working directory as topic namespace: aaa |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
32 $ hg topic a-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
33 marked working directory as topic: a-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
34 $ mkcommit apple |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
35 active topic 'a-things' grew its first changeset |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
36 (see 'hg help topics' for more information) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
37 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
38 $ hg up 'desc("ROOT")' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
39 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
40 $ hg debug-topic-namespace bbb |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
41 marked working directory as topic namespace: bbb |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
42 $ hg topic b-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
43 marked working directory as topic: b-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
44 $ mkcommit banana |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
45 active topic 'b-things' grew its first changeset |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
46 (see 'hg help topics' for more information) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
47 $ mkcommit blackberry |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
48 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
49 $ hg up 'desc("apple")' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
50 switching to topic-namespace aaa |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
51 switching to topic a-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
52 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
53 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
54 This is what the help text says about this issue |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
55 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
56 $ hg help pick | grep 'active topic' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
57 If there is an active topic, it will be used for the resulting changeset. |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
58 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
59 wdir has no active topic: pick should clear topic of the resulting cset |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
60 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
61 $ hg debug-topic-namespace --clear |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
62 $ hg topic --clear |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
63 $ hg pick 'desc("banana")' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
64 picking 2:fcda3d8dafd2 "banana" |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
65 1 new orphan changesets |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
66 $ hg log -r . -T '{rev}: {desc} ({fqbn})\n' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
67 4: banana (default//bbb/b-things) (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
68 4: banana (default) (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
69 $ hg debug-topic-namespace |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
70 none |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
71 $ hg topic --current |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
72 no active topic |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
73 [1] |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
74 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
75 wdir has active topic: pick should use the active topic for the resulting cset |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
76 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
77 $ hg debug-topic-namespace everything |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
78 marked working directory as topic namespace: everything |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
79 $ hg topic all-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
80 marked working directory as topic: all-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
81 $ hg pick 'desc("blackberry")' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
82 picking 3:48bbfbece8fa "blackberry" |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
83 active topic 'all-things' grew its first changeset (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
84 (see 'hg help topics' for more information) (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
85 $ hg log -r . -T '{rev}: {desc} ({fqbn})\n' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
86 5: blackberry (default//bbb/b-things) (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
87 5: blackberry (default//everything/all-things) (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
88 $ hg debug-topic-namespace |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
89 everything |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
90 $ hg topic --current |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
91 all-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
92 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
93 $ hg log -GT '{rev}: {desc} ({fqbn})\n{join(extras, " ")}\n\n' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
94 @ 5: blackberry (default//bbb/b-things) (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
95 | branch=default topic=b-things topic-namespace=bbb (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
96 @ 5: blackberry (default//everything/all-things) (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
97 | branch=default topic=all-things topic-namespace=everything (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
98 | |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
99 o 4: banana (default//bbb/b-things) (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
100 | branch=default topic=b-things topic-namespace=bbb (known-bad-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
101 o 4: banana (default) (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
102 | branch=default (missing-correct-output !) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
103 | |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
104 o 1: apple (default//aaa/a-things) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
105 | branch=default topic=a-things topic-namespace=aaa |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
106 | |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
107 o 0: ROOT (default) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
108 branch=default |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
109 |