Mercurial > evolve
changeset 4995:d31d39ea0fe4 stable
test: add test for content divergence involving a date update
In this case, one side update to an older date.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Dec 2019 19:27:55 +0100 |
parents | 8b6e2565aaf3 |
children | 6061995cfad0 |
files | tests/test-evolve-issue5958.t |
diffstat | 1 files changed, 58 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-evolve-issue5958.t Tue Dec 10 19:13:06 2019 +0100 +++ b/tests/test-evolve-issue5958.t Tue Dec 10 19:27:55 2019 +0100 @@ -22,6 +22,8 @@ (Make changes in unrelated files so that we don't have any merge conflicts during the rebase, but the two touched revisions aren't identical) +date: updated on both side to the same value + $ echo hi > bar.txt $ hg add -q bar.txt $ hg amend -q @@ -99,3 +101,59 @@ 4 c17bf400a278 1969-12-31 23:59 -0000: rewritten using evolve as 7:2372e6d39855 7 2372e6d39855 1970-01-01 00:00 +0000: 7 bb2424887202 1969-12-31 23:59 +0000: (false !) + +date: updated one one side to an older value + + $ hg evolve -r . + move:[7] add foo.txt + atop:[0] add r0 + working directory is now at 2b9788beff53 + $ hg update --hidden --rev 'predecessors(.)' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 2372e6d39855 + (hidden revision '2372e6d39855' was rewritten as: 2b9788beff53) + working directory parent is obsolete! (2372e6d39855) + (use 'hg evolve' to update to its successor: 2b9788beff53) + $ hg amend --date "0 2" + 1 new orphan changesets + 2 new content-divergent changesets + $ hg rebase -r . -d 0 + rebasing 9:88085147662e "add foo.txt" (tip) + $ hg log -G + @ changeset: 10:873d828420d8 + | tag: tip + | parent: 0:a24ed8ad918c + | user: test + | date: Wed Dec 31 23:59:58 1969 -0000 + | instability: content-divergent + | summary: add foo.txt + | + | * changeset: 8:2b9788beff53 + |/ parent: 0:a24ed8ad918c + | user: test + | date: Thu Jan 01 00:00:00 1970 +0000 + | instability: content-divergent + | summary: add foo.txt + | + o changeset: 0:a24ed8ad918c + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add r0 + + $ hg evolve --list -r . + 873d828420d8: add foo.txt + content-divergent: 2b9788beff53 (draft) (precursor 2372e6d39855) + + $ hg log -r 2372e6d39855+873d828420d8+2b9788beff53 --hidden -T '{rev} {node|short} {date|isodate}: {join(obsfate, "; ")}\n' + 7 2372e6d39855 1970-01-01 00:00 +0000: date-changed using amend as 9:88085147662e; rebased using evolve as 8:2b9788beff53 + 10 873d828420d8 1969-12-31 23:59 -0000: + 8 2b9788beff53 1970-01-01 00:00 +0000: + $ hg evolve --content-divergent + merge:[8] add foo.txt + with: [10] add foo.txt + base: [7] add foo.txt + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at bb2424887202 + $ hg log -r . --hidden -T '{rev} {node|short} {date|isodate}: {join(obsfate, "; ")}\n' + 11 bb2424887202 1970-01-01 00:00 +0000: + 11 bb2424887202 1969-12-31 23:59 +0000: (false !)