comparison tests/test-evolve-obshistory-amend.t @ 3894:7c624b45fe60

obslog: check filtered output with amended changesets
author Boris Feld <boris.feld@octobus.net>
date Tue, 22 May 2018 16:48:35 +0200
parents 8f27e17c3558
children f7afd3a158e3 c16fed4908d8
comparison
equal deleted inserted replaced
3893:aab2afc2bd82 3894:7c624b45fe60
12 12
13 Test setup 13 Test setup
14 ---------- 14 ----------
15 15
16 $ hg init $TESTTMP/local-amend 16 $ hg init $TESTTMP/local-amend
17 $ hg init $TESTTMP/server
17 $ cd $TESTTMP/local-amend 18 $ cd $TESTTMP/local-amend
18 $ mkcommit ROOT 19 $ mkcommit ROOT
19 $ mkcommit A0 20 $ sync
21 $ mkcommit A0 .
20 $ echo 42 >> A0 22 $ echo 42 >> A0
21 $ hg amend -m "A1 23 $ hg amend -m "A1
22 > 24 >
23 > Better commit message" 25 > Better commit message"
26 $ sync
24 $ hg log --hidden -G 27 $ hg log --hidden -G
25 @ changeset: 2:4ae3a4151de9 28 @ changeset: 2:4ae3a4151de9
26 | tag: tip 29 | tag: tip
27 | parent: 0:ea207398892e 30 | parent: 0:ea207398892e
28 | user: test 31 | user: test
38 o changeset: 0:ea207398892e 41 o changeset: 0:ea207398892e
39 user: test 42 user: test
40 date: Thu Jan 01 00:00:00 1970 +0000 43 date: Thu Jan 01 00:00:00 1970 +0000
41 summary: ROOT 44 summary: ROOT
42 45
43 Actual test 46 Check output on the client side
44 ----------- 47 -------------------------------
45 $ hg obslog --patch 4ae3a4151de9 48 $ hg obslog --patch 4ae3a4151de9
46 @ 4ae3a4151de9 (2) A1 49 @ 4ae3a4151de9 (2) A1
47 | 50 |
48 x 471f378eab4c (1) A0 51 x 471f378eab4c (1) A0
49 rewritten(description, content) as 4ae3a4151de9 using amend by test (*) (glob) 52 rewritten(description, content) as 4ae3a4151de9 using amend by test (*) (glob)
199 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 202 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 updated to hidden changeset 471f378eab4c 203 updated to hidden changeset 471f378eab4c
201 (hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9) 204 (hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9)
202 working directory parent is obsolete! (471f378eab4c) 205 working directory parent is obsolete! (471f378eab4c)
203 (use 'hg evolve' to update to its successor: 4ae3a4151de9) 206 (use 'hg evolve' to update to its successor: 4ae3a4151de9)
207
208 Check output on the server side
209 -------------------------------
210
211 $ hg obslog -R $TESTTMP/server --patch 4ae3a4151de9
212 o 4ae3a4151de9 (1) A1
213 |
214 x 471f378eab4c
215 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
216 (No patch available, context is not local)
217
218 $ hg obslog -R $TESTTMP/server -f --patch 4ae3a4151de9
219 o 4ae3a4151de9 (1) A1
220
221 $ hg obslog -R $TESTTMP/server --no-graph --patch 4ae3a4151de9
222 4ae3a4151de9 (1) A1
223 471f378eab4c
224 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
225 (No patch available, context is not local)
226
227 $ hg obslog -R $TESTTMP/server --no-graph -f --patch 4ae3a4151de9
228 4ae3a4151de9 (1) A1
229 471f378eab4c
230 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
231 (No patch available, context is not local)
232
233 Amend two more times
234 ====================
235
236 Amend again
237 -----------
238 $ hg log --hidden -G
239 o changeset: 2:4ae3a4151de9
240 | tag: tip
241 | parent: 0:ea207398892e
242 | user: test
243 | date: Thu Jan 01 00:00:00 1970 +0000
244 | summary: A1
245 |
246 | @ changeset: 1:471f378eab4c
247 |/ user: test
248 | date: Thu Jan 01 00:00:00 1970 +0000
249 | obsolete: rewritten using amend as 2:4ae3a4151de9
250 | summary: A0
251 |
252 o changeset: 0:ea207398892e
253 user: test
254 date: Thu Jan 01 00:00:00 1970 +0000
255 summary: ROOT
256
257 $ hg up tip
258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 $ hg amend -m "A2
260 >
261 > Better better commit message"
262 $ hg amend -m "A3
263 >
264 > Better better better commit message"
265 $ sync
266 $ hg log --hidden -G
267 @ changeset: 4:92210308515b
268 | tag: tip
269 | parent: 0:ea207398892e
270 | user: test
271 | date: Thu Jan 01 00:00:00 1970 +0000
272 | summary: A3
273 |
274 | x changeset: 3:4f1685185907
275 |/ parent: 0:ea207398892e
276 | user: test
277 | date: Thu Jan 01 00:00:00 1970 +0000
278 | obsolete: reworded using amend as 4:92210308515b
279 | summary: A2
280 |
281 | x changeset: 2:4ae3a4151de9
282 |/ parent: 0:ea207398892e
283 | user: test
284 | date: Thu Jan 01 00:00:00 1970 +0000
285 | obsolete: reworded using amend as 3:4f1685185907
286 | summary: A1
287 |
288 | x changeset: 1:471f378eab4c
289 |/ user: test
290 | date: Thu Jan 01 00:00:00 1970 +0000
291 | obsolete: rewritten using amend as 2:4ae3a4151de9
292 | summary: A0
293 |
294 o changeset: 0:ea207398892e
295 user: test
296 date: Thu Jan 01 00:00:00 1970 +0000
297 summary: ROOT
298
299 Check the output on the client
300 ------------------------------
301
302 $ hg obslog --patch 92210308515b
303 @ 92210308515b (4) A3
304 |
305 x 4f1685185907 (3) A2
306 | rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
307 | diff -r 4f1685185907 -r 92210308515b changeset-description
308 | --- a/changeset-description
309 | +++ b/changeset-description
310 | @@ -1,3 +1,3 @@
311 | -A2
312 | +A3
313 |
314 | -Better better commit message
315 | +Better better better commit message
316 |
317 |
318 x 4ae3a4151de9 (2) A1
319 | rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
320 | diff -r 4ae3a4151de9 -r 4f1685185907 changeset-description
321 | --- a/changeset-description
322 | +++ b/changeset-description
323 | @@ -1,3 +1,3 @@
324 | -A1
325 | +A2
326 |
327 | -Better commit message
328 | +Better better commit message
329 |
330 |
331 x 471f378eab4c (1) A0
332 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
333 diff -r 471f378eab4c -r 4ae3a4151de9 changeset-description
334 --- a/changeset-description
335 +++ b/changeset-description
336 @@ -1,1 +1,3 @@
337 -A0
338 +A1
339 +
340 +Better commit message
341
342 diff -r 471f378eab4c -r 4ae3a4151de9 A0
343 --- a/A0 Thu Jan 01 00:00:00 1970 +0000
344 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000
345 @@ -1,1 +1,2 @@
346 A0
347 +42
348
349
350 Check the output on the server
351 ------------------------------
352
353 $ hg obslog -R $TESTTMP/server --patch 92210308515b
354 o 92210308515b (2) A3
355 |
356 x 4f1685185907
357 | rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
358 | (No patch available, context is not local)
359 |
360 x 4ae3a4151de9 (1) A1
361 | rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
362 | (No patch available, successor is unknown locally)
363 |
364 x 471f378eab4c
365 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
366 (No patch available, context is not local)
367
368 $ hg obslog -R $TESTTMP/server -f --patch 92210308515b
369 o 92210308515b (2) A3
370 |
371 x 4ae3a4151de9 (1) A1
372 reworded(description) as 92210308515b using amend by test (at Thu Jan 01 00:00:00 1970 +0000)
373 diff -r 4ae3a4151de9 -r 92210308515b changeset-description
374 --- a/changeset-description
375 +++ b/changeset-description
376 @@ -1,3 +1,3 @@
377 -A1
378 +A3
379
380 -Better commit message
381 +Better better better commit message
382
383
384 $ hg obslog -R $TESTTMP/server --no-graph --patch 92210308515b
385 92210308515b (2) A3
386 4f1685185907
387 rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
388 (No patch available, context is not local)
389 4ae3a4151de9 (1) A1
390 rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
391 (No patch available, successor is unknown locally)
392 471f378eab4c
393 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
394 (No patch available, context is not local)
395
396 $ hg obslog -R $TESTTMP/server --no-graph -f --patch 92210308515b
397 92210308515b (2) A3
398 4f1685185907
399 rewritten(description) as 92210308515b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
400 (No patch available, context is not local)
401 4ae3a4151de9 (1) A1
402 rewritten(description) as 4f1685185907 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
403 (No patch available, successor is unknown locally)
404 471f378eab4c
405 rewritten(description, content) as 4ae3a4151de9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
406 (No patch available, context is not local)