Mercurial > evolve
changeset 4996:6061995cfad0 stable
test: add test for content divergence involving a date update
In this case, one side update to an earlier date.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Dec 2019 19:55:37 +0100 |
parents | d31d39ea0fe4 |
children | e989d109ca9c |
files | tests/test-evolve-issue5958.t |
diffstat | 1 files changed, 51 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-evolve-issue5958.t Tue Dec 10 19:27:55 2019 +0100 +++ b/tests/test-evolve-issue5958.t Tue Dec 10 19:55:37 2019 +0100 @@ -157,3 +157,54 @@ $ 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 !) + +date: updated one side to an newer value + + $ hg update --hidden --rev 'predecessors(.)' + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset 873d828420d8 + (hidden revision '873d828420d8' was rewritten as: bb2424887202) + working directory parent is obsolete! (873d828420d8) + (use 'hg evolve' to update to its successor: bb2424887202) + $ hg amend --date "120 0" + 2 new content-divergent changesets + $ hg log -G + @ changeset: 12:902e190ef559 + | tag: tip + | parent: 0:a24ed8ad918c + | user: test + | date: Thu Jan 01 00:02:00 1970 +0000 + | instability: content-divergent + | summary: add foo.txt + | + | * changeset: 11:bb2424887202 + |/ 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 . + 902e190ef559: add foo.txt + content-divergent: bb2424887202 (draft) (precursor 873d828420d8) + + $ hg up bb2424887202 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg log -r 873d828420d8+bb2424887202+902e190ef559 --hidden -T '{rev} {node|short} {date|isodate}: {join(obsfate, "; ")}\n' + 10 873d828420d8 1969-12-31 23:59 -0000: date-changed using evolve as 11:bb2424887202; date-changed using amend as 12:902e190ef559 + 11 bb2424887202 1970-01-01 00:00 +0000: + 12 902e190ef559 1970-01-01 00:02 +0000: + $ hg evolve --content-divergent + merge:[11] add foo.txt + with: [12] add foo.txt + base: [10] add foo.txt + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + nothing changed + $ hg log -r . --hidden -T '{rev} {node|short} {date|isodate}: {join(obsfate, "; ")}\n' + 11 bb2424887202 1970-01-01 00:00 +0000: + 13 bb2424887202 1970-01-01 00:02 +0000: (false !)