Mercurial > evolve
annotate tests/test-single-head-obsolescence-topic-B3.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 |
---|---|
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 ========================================= |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
2 Testing single head enforcement: Case B-3 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 ========================================= |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 A repository is set to only accept a single head per name (typically named |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 branch). However, obsolete changesets can make this enforcement more |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 complicated, because they can be kept visible by other changeset on other |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 branch. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 This case is part of a series of tests checking this behavior. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
12 Category B: Involving obsolescence with topic |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
13 TestCase 3: Full superseding of a branch interleaved with another |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 .. old-state: |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 .. |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
17 .. * 2 changesets on topic Y |
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
18 .. * 2 changesets on topic X interleaved with the other |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 .. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 .. new-state: |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 .. |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
22 .. * 2 changesets on topic X at the same location |
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
23 .. * 2 changesets on topic Y superseding the other ones |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 .. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 .. expected-result: |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 .. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 .. * only one head detected |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 .. |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 .. graph-summary: |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 .. |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
31 .. D ● (topic-Y) |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 .. | |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
33 .. C ø⇠◔ C' (topix-X) |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 .. | | |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
35 .. B ● | (topic-Y) |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 .. | | |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
37 .. A ø⇠◔ A' (topic-X) |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 .. |/ |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 .. ● |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 $ . $TESTDIR/testlib/topic_setup.sh |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 $ . $TESTDIR/testlib/push-checkheads-util.sh |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 Test setup |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 ---------- |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
47 $ mkdir B3 |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
48 $ cd B3 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 $ setuprepos single-head |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 creating basic server and client repo |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 updating to branch default |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 $ cd client |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
54 $ hg topic -r . topic-X |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
55 switching to topic topic-X |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
56 changed topic on 1 changesets to "topic-X" |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
57 $ hg strip --config extensions.strip= --hidden 'hidden()' --no-backup # clean old A0 |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
58 $ hg topic topic-Y |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 $ mkcommit B0 |
6879
9da0114a8a02
topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents:
6267
diff
changeset
|
60 active topic '//topic-Y' grew its first changeset |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
61 (see 'hg help topics' for more information) |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
62 $ hg topic topic-X |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 $ mkcommit C0 |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
64 $ hg topic topic-Y |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 $ mkcommit D0 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 $ hg push --new-branch |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
67 pushing to $TESTTMP/B3/server |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 searching for changes |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 adding changesets |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 adding manifests |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 adding file changes |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
72 added 4 changesets with 3 changes to 4 files (+1 heads) |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
73 1 new obsolescence markers |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
74 obsoleted 1 changesets |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 $ hg up 0 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
77 $ hg topic topic-X |
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
78 marked working directory as topic: topic-X |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 $ mkcommit A1 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 $ mkcommit C1 |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
81 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 1 new obsolescence markers |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 obsoleted 1 changesets |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 3 new orphan changesets |
6080
8cc7732a29bf
tests: fix copypaste errors in single-head-obsolescence tests
Anton Shestakov <av6@dwimlabs.net>
parents:
6034
diff
changeset
|
85 $ hg debugobsolete `getid "desc(C0)"` `getid "desc(C1)"` |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 1 new obsolescence markers |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 obsoleted 1 changesets |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 $ hg log -G --hidden |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
89 @ 9f6e6381b9aa [default//topic-X] (draft): C1 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
90 | |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
91 o c1340bef453e [default//topic-X] (draft): A1 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 | |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
93 | * 850d57e10bfe [default//topic-Y] (draft): D0 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
94 | | |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
95 | x fcdd583577e8 [default//topic-X] (draft): C0 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
96 | | |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
97 | * 030eec7a0fe2 [default//topic-Y] (draft): B0 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
98 | | |
6267
1eb543272657
topic: switch to the short fqbn format by default
Anton Shestakov <av6@dwimlabs.net>
parents:
6260
diff
changeset
|
99 | x 5a47a98cd8e5 [default//topic-X] (draft): A0 |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
100 |/ |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
101 o 1e4be0697311 [default] (public): root |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
102 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
104 Actual testing |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
105 -------------- |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
106 |
5228
f560d23639e1
head-checking: ignore obsoleted section when checking head creation locally
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5227
diff
changeset
|
107 $ hg push -r 'desc("C1")' |
5229
fa1324e58fcf
head-checking: also test single head enforcement with topic
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5228
diff
changeset
|
108 pushing to $TESTTMP/B3/server |
5227
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
109 searching for changes |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
110 adding changesets |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 adding manifests |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 adding file changes |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
113 added 2 changesets with 2 changes to 2 files (+1 heads) |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
114 2 new obsolescence markers |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 obsoleted 2 changesets |
b20d04641c0f
head-checking: ignore obsolete section when checking for single heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
116 2 new orphan changesets |