annotate tests/test-namespaces-report.t @ 6500:206fb02765bf

topic: explain the tns reporting case for phase divergence more
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 13 Jun 2023 19:34:04 +0200
parents b165d2bb5868
children e45bfd1e0588
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
1 ============================================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
2 Test detection of topic name space affected by a transaction
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
3 ============================================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
4
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
5 Reporting affected topic namespaces in transactions
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
6
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
7 $ . "$TESTDIR/testlib/common.sh"
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
8
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
9 $ cat >> $HGRCPATH << EOF
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
10 > [extensions]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
11 > evolve =
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
12 > topic =
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
13 > [phases]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
14 > publish = no
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
15 > [devel]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
16 > tns-report-transactions = push
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
17 > EOF
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
18
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
19 $ hg init orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
20
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
21 case 1: new changeset (draft with topic namespace)
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
22 ==================================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
23
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
24 topic namespace of that changeset is reported
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
25
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
26 $ hg clone orig case-1 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
27 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
28
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
29 $ echo apple > a
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
30 $ hg ci -qAm apple
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
31
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
32 $ hg push ../case-1
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
33 pushing to ../case-1
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
34 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
35 adding changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
36 adding manifests
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
37 adding file changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
38 added 1 changesets with 1 changes to 1 files
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
39
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
40 $ echo banana > b
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
41 $ hg debug-topic-namespace bob
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
42 marked working directory as topic namespace: bob
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
43 $ hg ci -qAm 'banana'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
44
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
45 XXX: should not require --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
46
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
47 $ hg push ../case-1 --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
48 pushing to ../case-1
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
49 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
50 adding changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
51 adding manifests
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
52 adding file changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
53 topic namespaces affected: bob
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
54 added 1 changesets with 1 changes to 1 files
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
55
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
56 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
57
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
58 case 2: obsmarker affecting known changeset
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
59 ===========================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
60
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
61 topic namespaces of both the precursor and the successor are affected
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
62
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
63 $ hg clone orig case-2 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
64 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
65
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
66 $ echo broccoli > b
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
67 $ hg debug-topic-namespace bruce
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
68 $ hg ci --amend -m 'broccoli'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
69
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
70 XXX: should not require --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
71
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
72 $ hg push ../case-2 --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
73 pushing to ../case-2
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
74 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
75 adding changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
76 adding manifests
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
77 adding file changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
78 topic namespaces affected: bob bruce
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
79 added 1 changesets with 1 changes to 1 files (+1 heads)
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
80 1 new obsolescence markers
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
81 obsoleted 1 changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
82
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
83 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
84
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
85 case 3: phase divergence
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
86 ========================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
87
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
88 3 phase divergence resolution can point to a thing but not affect it (probably not affected)
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
89
6500
206fb02765bf topic: explain the tns reporting case for phase divergence more
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6499
diff changeset
90 In this case, the pushed changeset comes with an obsmarker whose predecessors
206fb02765bf topic: explain the tns reporting case for phase divergence more
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6499
diff changeset
91 has the `charlie` topic-namespace and the successors has the `carol`
206fb02765bf topic: explain the tns reporting case for phase divergence more
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6499
diff changeset
92 topic-namespace. However, that obsolescence is part of a phase-divergence
206fb02765bf topic: explain the tns reporting case for phase divergence more
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6499
diff changeset
93 fixup, so we should now mark `coconut` as affected since it is already public.
206fb02765bf topic: explain the tns reporting case for phase divergence more
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6499
diff changeset
94
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
95 $ hg clone orig case-3 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
96 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
97
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
98 $ hg debug-topic-namespace charlie
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
99 $ echo coconut > c
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
100 $ hg ci -qAm 'coconut'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
101
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
102 $ hg debug-topic-namespace carol
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
103 $ echo cloudberry > c
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
104 $ hg ci --amend -m 'cloudberry'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
105
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
106 $ hg phase --hidden -r 'desc("coconut")' --public
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
107 1 new phase-divergent changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
108
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
109 $ hg evolve --phase-divergent
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
110 recreate:[4] cloudberry
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
111 atop:[3] coconut
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
112 committed as c398b3caf447
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
113 working directory is now at c398b3caf447
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
114
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
115 XXX: should not require --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
116
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
117 $ hg push ../case-3 --new-branch
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
118 pushing to ../case-3
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
119 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
120 adding changesets
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
121 adding manifests
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
122 adding file changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
123 topic namespaces affected: bruce carol
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
124 added 2 changesets with 2 changes to 1 files
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
125 2 new obsolescence markers
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
126
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
127 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
128
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
129 case 4: phase movement: publishing drafts
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
130 =========================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
131
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
132 topic namespaces of published changesets are affected
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
133
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
134 $ hg clone orig case-4 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
135 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
136
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
137 $ hg push ../case-4 --publish
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
138 pushing to ../case-4
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
139 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
140 no changes found
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
141 topic namespaces affected: carol
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
142 [1]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
143
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
144 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
145
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
146 case 5: bookmark movement
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
147 =========================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
148
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
149 Bookmark movement that affect tns (like putting a bookmark on obsolete
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
150 changesets) their topic namespaces reappear and are therefore reported
6497
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
151
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
152 $ hg clone orig case-5 -q
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
153 $ cd orig
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
154
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
155 $ hg debug-topic-namespace dana
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
156 $ echo durian > d
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
157 $ hg ci -qAm 'durian'
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
158
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
159 XXX: should not require --new-branch
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
160
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
161 $ hg push ../case-5 --new-branch
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
162 pushing to ../case-5
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
163 searching for changes
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
164 adding changesets
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
165 adding manifests
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
166 adding file changes
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
167 topic namespaces affected: dana
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
168 added 1 changesets with 1 changes to 1 files
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
169
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
170 $ hg debug-topic-namespace dave
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
171 $ echo dragonfruit > d
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
172 $ hg ci --amend -m 'dragonfruit'
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
173
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
174 XXX: should not require --new-branch
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
175
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
176 $ hg push ../case-5 --new-branch
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
177 pushing to ../case-5
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
178 searching for changes
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
179 adding changesets
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
180 adding manifests
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
181 adding file changes
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
182 topic namespaces affected: dana dave
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
183 added 1 changesets with 1 changes to 1 files (+1 heads)
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
184 1 new obsolescence markers
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
185 obsoleted 1 changesets
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
186
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
187 $ hg bookmark --hidden -r 'desc("durian")' @
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
188 bookmarking hidden changeset ac97707e6b4a
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
189 (hidden revision 'ac97707e6b4a' was rewritten as: 822ac0064503)
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
190
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
191 $ hg push ../case-5 -B @
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
192 pushing to ../case-5
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
193 searching for changes
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
194 no changes found
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
195 topic namespaces affected: dana
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
196 exporting bookmark @
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
197 [1]
4e0f760d332e topic: also find and report topic namespace changes caused by bookmarks
Anton Shestakov <av6@dwimlabs.net>
parents: 6496
diff changeset
198
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
199 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
200
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
201 case 6: phase movement: publishing secret changesets
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
202 ====================================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
203
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
204 (that are known on the server)
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
205
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
206 topic namespaces of published changesets are affected
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
207
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
208 $ hg clone orig case-6 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
209 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
210
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
211 $ hg push ../case-6 -r . --publish
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
212 pushing to ../case-6
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
213 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
214 no changes found
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
215 topic namespaces affected: dave
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
216 [1]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
217
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
218 previous topic namespace is resurrected...
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
219
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
220 $ hg phase --secret --force -r . --config 'devel.tns-report-transactions=phase'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
221 topic namespaces affected: dave
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
222
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
223 ...just to disappear again
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
224
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
225 $ hg push ../case-6 -r . --config 'devel.tns-report-transactions=*'
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
226 pushing to ../case-6
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
227 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
228 no changes found
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
229 topic namespaces affected: dave
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
230 [1]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
231
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
232 $ cd ..
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
233
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
234 case 7: phase movement: secret->draft on the server
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
235 ===================================================
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
236
6498
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
237 changeset becomes visible to peers, so its topic namespace is affected
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
238
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
239 $ hg clone orig case-7 -q
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
240 $ cd orig
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
241
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
242 $ hg phase --draft --force -r tip
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
243 $ hg phase --secret --force -r tip -R ../case-7
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
244
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
245 XXX: should not require --new-branch
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
246
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
247 $ hg push ../case-7 -r . --config 'devel.tns-report-transactions=*' --new-branch
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
248 pushing to ../case-7
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
249 searching for changes
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
250 adding changesets
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
251 adding manifests
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
252 adding file changes
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
253 topic namespaces affected: dave
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
254 added 0 changesets with 0 changes to 1 files
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
255
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
256 $ cd ..
7ecb0f9cc7f3 topic: report namespace changes in more cases of phase movements
Anton Shestakov <av6@dwimlabs.net>
parents: 6497
diff changeset
257
6499
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
258 case: 99 pushing obsmarker for an unknown changeset
b165d2bb5868 topic: add better title to tns report tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6498
diff changeset
259 ===================================================
6496
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
260 doesn't affect any topic namespace, we report nothing
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
261
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
262 $ hg clone orig case-99 -q
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
263 $ cd orig
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
264
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
265 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid "desc('dragonfruit')"`
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
266 1 new obsolescence markers
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
267
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
268 $ hg push ../case-99
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
269 pushing to ../case-99
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
270 searching for changes
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
271 no changes found
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
272 1 new obsolescence markers
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
273 [1]
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
274
fba501baf5cb topic: find and report topic namespace changes in transactions
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
275 $ cd ..