Mercurial > evolve
annotate tests/test-evolve-content-divergent-case-A1.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 | 8c3656505d4d |
children |
rev | line source |
---|---|
5389
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
1 =============================================== |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
2 Testing content-divergence resolution: Case A.1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
3 =============================================== |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
4 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
5 Independent rewrites of same changeset can lead to content-divergence. In most |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
6 common cases, it can occur when multiple users rewrite the same changeset |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
7 independently and push it. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
8 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
9 This test belongs to a series of tests checking the resolution of content-divergent |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
10 changesets. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
11 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
12 Category A: no parents are obsolete |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
13 Testcase 1: no conflict: independent metadata changes only |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
14 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
15 A.1 No content changes on any side |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
16 ================================== |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
17 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
18 .. (Divergence reason): |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
19 .. local: changed the description of changeset |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
20 .. other: changed the date of changeset |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
21 .. Where we show that since there is no content change in divergent changesets |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
22 .. we should only merge the metadata of changesets in a 3-way merge |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
23 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
24 .. (local): |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
25 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
26 .. A ø⇠○ A' |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
27 .. |/ |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
28 .. ● O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
29 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
30 .. (other): |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
31 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
32 .. A ø⇠○ A'' |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
33 .. |/ |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
34 .. ● O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
35 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
36 .. (Resolution): |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
37 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
38 .. ○ A''' |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
39 .. | |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
40 .. ● O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
41 .. |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
42 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
43 Setup |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
44 ----- |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
45 $ . $TESTDIR/testlib/content-divergence-util.sh |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
46 $ setuprepos A.1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
47 creating test repo for test case A.1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
48 - upstream |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
49 - local |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
50 - other |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
51 cd into `local` and proceed with env setup |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
52 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
53 initial |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
54 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
55 $ cd local |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
56 $ mkcommit A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
57 $ hg push -q |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
58 $ hg amend -m "A1" |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
59 $ hg log -G --hidden |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
60 @ 2:0d8c87cec5fc (draft): A1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
61 | |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
62 | x 1:28b51eb45704 (draft): A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
63 |/ |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
64 o 0:a9bdc8b26820 (public): O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
65 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
66 $ cd ../other |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
67 $ hg pull -uq |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
68 $ hg amend -d '0 1' |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
69 $ hg push -q |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
70 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
71 $ cd ../local |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
72 $ hg pull -q |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
73 2 new content-divergent changesets |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
74 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
75 Actual test of resolution |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
76 ------------------------- |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
77 $ hg evolve -l |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
78 0d8c87cec5fc: A1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
79 content-divergent: ece7459c388a (draft) (precursor 28b51eb45704) |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
80 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
81 ece7459c388a: A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
82 content-divergent: 0d8c87cec5fc (draft) (precursor 28b51eb45704) |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
83 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
84 $ hg log -G --hidden |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
85 * 3:ece7459c388a (draft): A0 [content-divergent] |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
86 | |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
87 | @ 2:0d8c87cec5fc (draft): A1 [content-divergent] |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
88 |/ |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
89 | x 1:28b51eb45704 (draft): A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
90 |/ |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
91 o 0:a9bdc8b26820 (public): O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
92 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
93 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
94 $ hg evolve --content-divergent |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
95 merge:[2] A1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
96 with: [3] A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
97 base: [1] A0 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
98 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
99 working directory is now at 36c6c1f70ad9 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
100 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
101 $ hg log -G |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
102 @ 4:36c6c1f70ad9 (draft): A1 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
103 | |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
104 o 0:a9bdc8b26820 (public): O |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
105 |
8c3656505d4d
evolve: add content-div test for case when no changes
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
106 $ hg evolve -l |