Mercurial > evolve
diff tests/test-prev-next.t @ 3816:4c68dd62943c mercurial-4.5
test-compat: merge stable into mercurial-4.5
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 08 Jun 2018 22:52:51 +0530 |
parents | 27e7ed2d13a6 |
children | 5ca297e78f2c 503ae2689df8 |
line wrap: on
line diff
--- a/tests/test-prev-next.t Wed Apr 25 14:09:34 2018 +0100 +++ b/tests/test-prev-next.t Fri Jun 08 22:52:51 2018 +0530 @@ -354,3 +354,130 @@ atop:[3] one working directory now at a7d885c75614 $ wait + +testing next --evolve when working directory is dirty + + $ hg log -GT "{rev}:{node|short} {desc|firstline}" + @ 4:a7d885c75614 two + | + o 3:c741983992fc one + + + $ hg up .^ + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ echo foobar > bar + $ hg add bar + $ hg amend + 1 new orphan changesets + + $ echo babar > bar + + $ hg next --evolve + abort: uncommitted changes + [255] + + $ cd .. + +Testing that `next` and `prev` respects `commands.update.check=noconflict` + + $ hg init noconflict + $ cd noconflict + $ echo "[commands]" >> .hg/hgrc + $ echo "update.check=noconflict" >> .hg/hgrc + + $ echo hi > wat + $ hg ci -Aqm "added wat" + $ echo hi > foo + $ hg ci -Aqm "added foo" + $ echo hi > bar + $ hg ci -Aqm "added bar" + +testing for `hg prev` + + $ echo bar > wat + $ hg prev + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + [1] added foo + $ hg diff + diff -r cf959ce4e1ff wat + --- a/wat Thu Jan 01 00:00:00 1970 +0000 + +++ b/wat Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,1 @@ + -hi + +bar + +testing for `hg next` + + $ hg next + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + [2] added bar + $ hg diff + diff -r ac3de1218820 wat + --- a/wat Thu Jan 01 00:00:00 1970 +0000 + +++ b/wat Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +1,1 @@ + -hi + +bar + +test that we dont end up in merge conflicts + + $ echo bar > bar + $ hg prev + abort: conflicting changes + (do you want --merge?) + [255] + + $ echo hi > bar + $ hg prev + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + [1] added foo + $ echo bar > bar + $ hg add bar + + $ hg next + abort: conflicting changes + (do you want --merge?) + [255] + +Test that --merge still works fine with commands.update.check set + +XXX: yes we want --merge and we passed that! + $ echo hi > bar + $ echo bar >> bar + $ hg next --merge + merging bar + warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges + [2] added bar + + $ echo babar > bar + $ hg resolve -m + (no more unresolved files) + +Testing --merge works with other values of commands.update.check also + +XXX: things are broken! + $ hg prev --merge --config commands.update.check=abort + local [working copy] changed bar which other [destination] deleted + use (c)hanged version, (d)elete, or leave (u)nresolved? + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges + [1] added foo + + $ hg revert --all + forgetting bar + reverting wat + $ hg resolve -m + (no more unresolved files) + + $ echo bar > bar + $ hg add bar + + $ hg next --merge --config commands.update.check=abort + merging bar + warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges + [2] added bar