Mercurial > evolve
annotate tests/test-topic-issue6406.t @ 6889:a66cf9008781
obslog: also display patch for rebased changesets
This applies the same logic that is used for "merge-diff" to rebased
changesets. The successors' content is compared to the content of the
predecessors rebased in-memory on the new parents.
This highlights the changes that were actually introduced while rebasing (like
conflict resolution or API adjustment).
As a side effect, obslog now also outputs slightly more diffs for splits,
showing what parts of the original big changeset were moved to the smaller
split components (but for now it only works for the first few changesets).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 22 Sep 2024 02:58:54 +0200 |
parents | 9da0114a8a02 |
children |
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 |
6879
9da0114a8a02
topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents:
6655
diff
changeset
|
35 active topic '//aaa/a-things' grew its first changeset |
6654
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 |
6879
9da0114a8a02
topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents:
6655
diff
changeset
|
45 active topic '//bbb/b-things' grew its first changeset |
6654
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' |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
57 The resulting changeset will have the current active topic. If there's no |
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
58 active topic set, the resulting changeset will also not have any topic. |
6654
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
59 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
60 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
|
61 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
62 $ hg debug-topic-namespace --clear |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
63 $ hg topic --clear |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
64 $ hg pick 'desc("banana")' |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
65 picking 2:fcda3d8dafd2 "banana" |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
66 1 new orphan changesets |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
67 $ hg log -r . -T '{rev}: {desc} ({fqbn})\n' |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
68 4: banana (default) |
6654
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" |
6879
9da0114a8a02
topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents:
6655
diff
changeset
|
83 active topic '//everything/all-things' grew its first changeset |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
84 (see 'hg help topics' for more information) |
6654
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' |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
86 5: blackberry (default//everything/all-things) |
6654
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
87 $ hg debug-topic-namespace |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
88 everything |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
89 $ hg topic --current |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
90 all-things |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
91 |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
92 $ hg log -GT '{rev}: {desc} ({fqbn})\n{join(extras, " ")}\n\n' |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
93 @ 5: blackberry (default//everything/all-things) |
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
94 | branch=default topic=all-things topic-namespace=everything |
6654
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
95 | |
6655
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
96 o 4: banana (default) |
81fe0a498447
topic: internal config option to fix hg pick behavior (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
6654
diff
changeset
|
97 | branch=default |
6654
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 1: apple (default//aaa/a-things) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
100 | 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
|
101 | |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
102 o 0: ROOT (default) |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
103 branch=default |
968b9651b1f7
tests: demonstrate hg pick currently ignoring active topic (issue6406)
Anton Shestakov <av6@dwimlabs.net>
parents:
diff
changeset
|
104 |