|
1 This test file test the various messages when accessing obsolete |
|
2 revisions. |
|
3 |
|
4 Global setup |
|
5 ============ |
|
6 |
|
7 $ . $TESTDIR/testlib/obshistory_setup.sh |
|
8 |
|
9 Test output with lots of splitted commit |
|
10 ======================================== |
|
11 |
|
12 Test setup |
|
13 ---------- |
|
14 |
|
15 $ hg init $TESTTMP/local-lots-split |
|
16 $ cd $TESTTMP/local-lots-split |
|
17 $ mkcommit ROOT |
|
18 $ echo 42 >> a |
|
19 $ echo 43 >> b |
|
20 $ echo 44 >> c |
|
21 $ echo 45 >> d |
|
22 $ hg commit -A -m "A0" |
|
23 adding a |
|
24 adding b |
|
25 adding c |
|
26 adding d |
|
27 $ hg log --hidden -G |
|
28 @ changeset: 1:de7290d8b885 |
|
29 | tag: tip |
|
30 | user: test |
|
31 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
32 | summary: A0 |
|
33 | |
|
34 o changeset: 0:ea207398892e |
|
35 user: test |
|
36 date: Thu Jan 01 00:00:00 1970 +0000 |
|
37 summary: ROOT |
|
38 |
|
39 |
|
40 $ hg split -r 'desc(A0)' -d "0 0" << EOF |
|
41 > y |
|
42 > y |
|
43 > n |
|
44 > n |
|
45 > n |
|
46 > n |
|
47 > y |
|
48 > y |
|
49 > n |
|
50 > n |
|
51 > n |
|
52 > y |
|
53 > y |
|
54 > n |
|
55 > n |
|
56 > y |
|
57 > y |
|
58 > EOF |
|
59 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
60 adding a |
|
61 adding b |
|
62 adding c |
|
63 adding d |
|
64 diff --git a/a b/a |
|
65 new file mode 100644 |
|
66 examine changes to 'a'? [Ynesfdaq?] y |
|
67 |
|
68 @@ -0,0 +1,1 @@ |
|
69 +42 |
|
70 record change 1/4 to 'a'? [Ynesfdaq?] y |
|
71 |
|
72 diff --git a/b b/b |
|
73 new file mode 100644 |
|
74 examine changes to 'b'? [Ynesfdaq?] n |
|
75 |
|
76 diff --git a/c b/c |
|
77 new file mode 100644 |
|
78 examine changes to 'c'? [Ynesfdaq?] n |
|
79 |
|
80 diff --git a/d b/d |
|
81 new file mode 100644 |
|
82 examine changes to 'd'? [Ynesfdaq?] n |
|
83 |
|
84 created new head |
|
85 Done splitting? [yN] n |
|
86 diff --git a/b b/b |
|
87 new file mode 100644 |
|
88 examine changes to 'b'? [Ynesfdaq?] y |
|
89 |
|
90 @@ -0,0 +1,1 @@ |
|
91 +43 |
|
92 record change 1/3 to 'b'? [Ynesfdaq?] y |
|
93 |
|
94 diff --git a/c b/c |
|
95 new file mode 100644 |
|
96 examine changes to 'c'? [Ynesfdaq?] n |
|
97 |
|
98 diff --git a/d b/d |
|
99 new file mode 100644 |
|
100 examine changes to 'd'? [Ynesfdaq?] n |
|
101 |
|
102 Done splitting? [yN] n |
|
103 diff --git a/c b/c |
|
104 new file mode 100644 |
|
105 examine changes to 'c'? [Ynesfdaq?] y |
|
106 |
|
107 @@ -0,0 +1,1 @@ |
|
108 +44 |
|
109 record change 1/2 to 'c'? [Ynesfdaq?] y |
|
110 |
|
111 diff --git a/d b/d |
|
112 new file mode 100644 |
|
113 examine changes to 'd'? [Ynesfdaq?] n |
|
114 |
|
115 Done splitting? [yN] n |
|
116 diff --git a/d b/d |
|
117 new file mode 100644 |
|
118 examine changes to 'd'? [Ynesfdaq?] y |
|
119 |
|
120 @@ -0,0 +1,1 @@ |
|
121 +45 |
|
122 record this change to 'd'? [Ynesfdaq?] y |
|
123 |
|
124 no more change to split |
|
125 |
|
126 $ hg log --hidden -G |
|
127 @ changeset: 5:c7f044602e9b |
|
128 | tag: tip |
|
129 | user: test |
|
130 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
131 | summary: A0 |
|
132 | |
|
133 o changeset: 4:1ae8bc733a14 |
|
134 | user: test |
|
135 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
136 | summary: A0 |
|
137 | |
|
138 o changeset: 3:f257fde29c7a |
|
139 | user: test |
|
140 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
141 | summary: A0 |
|
142 | |
|
143 o changeset: 2:337fec4d2edc |
|
144 | parent: 0:ea207398892e |
|
145 | user: test |
|
146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
147 | summary: A0 |
|
148 | |
|
149 | x changeset: 1:de7290d8b885 |
|
150 |/ user: test |
|
151 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
152 | obsolete: split using split as 2:337fec4d2edc, 3:f257fde29c7a, 4:1ae8bc733a14, 5:c7f044602e9b |
|
153 | summary: A0 |
|
154 | |
|
155 o changeset: 0:ea207398892e |
|
156 user: test |
|
157 date: Thu Jan 01 00:00:00 1970 +0000 |
|
158 summary: ROOT |
|
159 |
|
160 Actual test |
|
161 ----------- |
|
162 |
|
163 $ hg obslog de7290d8b885 --hidden --patch |
|
164 x de7290d8b885 (1) A0 |
|
165 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000) |
|
166 (No patch available, too many successors (4)) |
|
167 |
|
168 $ hg obslog de7290d8b885 --hidden --all --patch |
|
169 o 1ae8bc733a14 (4) A0 |
|
170 | |
|
171 | o 337fec4d2edc (2) A0 |
|
172 |/ |
|
173 | @ c7f044602e9b (5) A0 |
|
174 |/ |
|
175 | o f257fde29c7a (3) A0 |
|
176 |/ |
|
177 x de7290d8b885 (1) A0 |
|
178 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000) |
|
179 (No patch available, too many successors (4)) |
|
180 |
|
181 $ hg obslog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool |
|
182 [ |
|
183 { |
|
184 "markers": [ |
|
185 { |
|
186 "date": [ |
|
187 *, (glob) |
|
188 0 (glob) |
|
189 ], |
|
190 "effect": [ |
|
191 "parent", |
|
192 "content" |
|
193 ], |
|
194 "operation": "split", |
|
195 "succnodes": [ |
|
196 "1ae8bc733a14", |
|
197 "337fec4d2edc", |
|
198 "c7f044602e9b", |
|
199 "f257fde29c7a" |
|
200 ], |
|
201 "user": "test", |
|
202 "verb": "rewritten" |
|
203 } |
|
204 ], |
|
205 "node": "de7290d8b885", |
|
206 "rev": 1, |
|
207 "shortdescription": "A0" |
|
208 } |
|
209 ] |
|
210 $ hg obslog c7f044602e9b --patch |
|
211 @ c7f044602e9b (5) A0 |
|
212 | |
|
213 x de7290d8b885 (1) A0 |
|
214 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000) |
|
215 (No patch available, too many successors (4)) |
|
216 |
|
217 $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool |
|
218 [ |
|
219 { |
|
220 "markers": [], |
|
221 "node": "c7f044602e9b", |
|
222 "rev": 5, |
|
223 "shortdescription": "A0" |
|
224 }, |
|
225 { |
|
226 "markers": [ |
|
227 { |
|
228 "date": [ |
|
229 *, (glob) |
|
230 0 (glob) |
|
231 ], |
|
232 "effect": [ |
|
233 "parent", |
|
234 "content" |
|
235 ], |
|
236 "operation": "split", |
|
237 "succnodes": [ |
|
238 "1ae8bc733a14", |
|
239 "337fec4d2edc", |
|
240 "c7f044602e9b", |
|
241 "f257fde29c7a" |
|
242 ], |
|
243 "user": "test", |
|
244 "verb": "rewritten" |
|
245 } |
|
246 ], |
|
247 "node": "de7290d8b885", |
|
248 "rev": 1, |
|
249 "shortdescription": "A0" |
|
250 } |
|
251 ] |
|
252 Check that debugobshistory on all heads show a coherent graph |
|
253 $ hg obslog 2::5 --patch |
|
254 o 1ae8bc733a14 (4) A0 |
|
255 | |
|
256 | o 337fec4d2edc (2) A0 |
|
257 |/ |
|
258 | @ c7f044602e9b (5) A0 |
|
259 |/ |
|
260 | o f257fde29c7a (3) A0 |
|
261 |/ |
|
262 x de7290d8b885 (1) A0 |
|
263 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000) |
|
264 (No patch available, too many successors (4)) |
|
265 |
|
266 $ hg obslog 5 --all --patch |
|
267 o 1ae8bc733a14 (4) A0 |
|
268 | |
|
269 | o 337fec4d2edc (2) A0 |
|
270 |/ |
|
271 | @ c7f044602e9b (5) A0 |
|
272 |/ |
|
273 | o f257fde29c7a (3) A0 |
|
274 |/ |
|
275 x de7290d8b885 (1) A0 |
|
276 rewritten(parent, content) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000) |
|
277 (No patch available, too many successors (4)) |
|
278 |
|
279 $ hg update de7290d8b885 |
|
280 abort: hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more! |
|
281 (use --hidden to access hidden revisions) |
|
282 [255] |
|
283 $ hg update --hidden 'min(desc(A0))' |
|
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
285 updated to hidden changeset de7290d8b885 |
|
286 (hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more) |
|
287 working directory parent is obsolete! (de7290d8b885) |
|
288 (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more) |