Mercurial > evolve
comparison tests/test-rewind.t @ 3860:fa184c5edfe8
rewind: test rewinding an amended changesets
We are now able to rewind a simple amended changeset. For now, its current
successors has not been obsoleted and we created divergence.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 Jun 2018 23:32:22 +0200 |
parents | 6e3d844b56f2 |
children | bbe635dfd75c |
comparison
equal
deleted
inserted
replaced
3859:6e3d844b56f2 | 3860:fa184c5edfe8 |
---|---|
223 user: test | 223 user: test |
224 date: Thu Jan 01 00:00:00 1970 +0000 | 224 date: Thu Jan 01 00:00:00 1970 +0000 |
225 summary: c_ROOT | 225 summary: c_ROOT |
226 | 226 |
227 $ cd .. | 227 $ cd .. |
228 | |
229 rewind a simple amend - creating content-divergence | |
230 --------------------------------------------------- | |
231 | |
232 Setup | |
233 ````` | |
234 | |
235 $ hg clone rewind-testing-base rewind-testing-single-rewrite | |
236 updating to branch default | |
237 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
238 $ cd rewind-testing-single-rewrite | |
239 $ echo BB > B | |
240 $ hg amend -m 'c_B1' | |
241 $ hg log -G | |
242 @ changeset: 3:25c8f5ab0c3b | |
243 | tag: tip | |
244 | parent: 1:579f120ba918 | |
245 | user: test | |
246 | date: Thu Jan 01 00:00:00 1970 +0000 | |
247 | summary: c_B1 | |
248 | | |
249 o changeset: 1:579f120ba918 | |
250 | user: test | |
251 | date: Thu Jan 01 00:00:00 1970 +0000 | |
252 | summary: c_A0 | |
253 | | |
254 o changeset: 0:eba9c2249fe7 | |
255 user: test | |
256 date: Thu Jan 01 00:00:00 1970 +0000 | |
257 summary: c_ROOT | |
258 | |
259 | |
260 Actual rewind | |
261 ````````````` | |
262 | |
263 $ hg rewind --hidden --to 'desc("c_B0")' | |
264 2 new content-divergent changesets | |
265 rewinded to 1 changesets | |
266 $ hg debugobsolete | |
267 7e594302a05d3769b27be88fc3cdfd39d7498498 25c8f5ab0c3bb569ec672570f1a901be4c6f032b 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'} | |
268 7e594302a05d3769b27be88fc3cdfd39d7498498 48acf2c0d9c8961859ce9a913671eb2adc9b057b 4 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '34', 'operation': 'rewind', 'user': 'test'} | |
269 $ hg obslog --rev 'desc("c_B0")' | |
270 * 48acf2c0d9c8 (4) c_B0 | |
271 | | |
272 x 7e594302a05d (2) c_B0 | |
273 rewritten(description, content) as 25c8f5ab0c3b using amend by test (Thu Jan 01 00:00:01 1970 +0000) | |
274 rewritten(meta, date) as 48acf2c0d9c8 using rewind by test (Thu Jan 01 00:00:01 1970 +0000) | |
275 | |
276 $ hg log -G | |
277 * changeset: 4:48acf2c0d9c8 | |
278 | tag: tip | |
279 | parent: 1:579f120ba918 | |
280 | user: test | |
281 | date: Thu Jan 01 00:00:01 1970 +0000 | |
282 | instability: content-divergent | |
283 | summary: c_B0 | |
284 | | |
285 | @ changeset: 3:25c8f5ab0c3b | |
286 |/ parent: 1:579f120ba918 | |
287 | user: test | |
288 | date: Thu Jan 01 00:00:00 1970 +0000 | |
289 | instability: content-divergent | |
290 | summary: c_B1 | |
291 | | |
292 o changeset: 1:579f120ba918 | |
293 | user: test | |
294 | date: Thu Jan 01 00:00:00 1970 +0000 | |
295 | summary: c_A0 | |
296 | | |
297 o changeset: 0:eba9c2249fe7 | |
298 user: test | |
299 date: Thu Jan 01 00:00:00 1970 +0000 | |
300 summary: c_ROOT | |
301 | |
302 $ hg log -G --hidden | |
303 * changeset: 4:48acf2c0d9c8 | |
304 | tag: tip | |
305 | parent: 1:579f120ba918 | |
306 | user: test | |
307 | date: Thu Jan 01 00:00:01 1970 +0000 | |
308 | instability: content-divergent | |
309 | summary: c_B0 | |
310 | | |
311 | @ changeset: 3:25c8f5ab0c3b | |
312 |/ parent: 1:579f120ba918 | |
313 | user: test | |
314 | date: Thu Jan 01 00:00:00 1970 +0000 | |
315 | instability: content-divergent | |
316 | summary: c_B1 | |
317 | | |
318 | x changeset: 2:7e594302a05d | |
319 |/ user: test | |
320 | date: Thu Jan 01 00:00:00 1970 +0000 | |
321 | obsolete: rewritten using rewind as 4:48acf2c0d9c8 | |
322 | obsolete: rewritten using amend as 3:25c8f5ab0c3b | |
323 | summary: c_B0 | |
324 | | |
325 o changeset: 1:579f120ba918 | |
326 | user: test | |
327 | date: Thu Jan 01 00:00:00 1970 +0000 | |
328 | summary: c_A0 | |
329 | | |
330 o changeset: 0:eba9c2249fe7 | |
331 user: test | |
332 date: Thu Jan 01 00:00:00 1970 +0000 | |
333 summary: c_ROOT | |
334 | |
335 | |
336 Cleanup | |
337 ``````` | |
338 $ hg prune 'max(desc("c_B0"))' | |
339 1 changesets pruned | |
340 $ hg log -G | |
341 @ changeset: 3:25c8f5ab0c3b | |
342 | tag: tip | |
343 | parent: 1:579f120ba918 | |
344 | user: test | |
345 | date: Thu Jan 01 00:00:00 1970 +0000 | |
346 | summary: c_B1 | |
347 | | |
348 o changeset: 1:579f120ba918 | |
349 | user: test | |
350 | date: Thu Jan 01 00:00:00 1970 +0000 | |
351 | summary: c_A0 | |
352 | | |
353 o changeset: 0:eba9c2249fe7 | |
354 user: test | |
355 date: Thu Jan 01 00:00:00 1970 +0000 | |
356 summary: c_ROOT | |
357 |