Mercurial > hg-stable
changeset 43890:5709a9992c2a
update: add some tests for the status quo of morestatus on update conflicts
Differential Revision: https://phab.mercurial-scm.org/D7666
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Fri, 13 Dec 2019 18:59:26 -0800 |
parents | 09bcbeacedc7 |
children | ac54b8a2ebea |
files | tests/test-update-branches.t |
diffstat | 1 files changed, 46 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-update-branches.t Sun Dec 15 21:43:18 2019 -0500 +++ b/tests/test-update-branches.t Fri Dec 13 18:59:26 2019 -0800 @@ -1,3 +1,8 @@ + $ cat >> $HGRCPATH <<EOF + > [commands] + > status.verbose=1 + > EOF + # Construct the following history tree: # # @ 5:e1bb631146ca b1 @@ -308,6 +313,10 @@ use 'hg resolve' to retry unresolved file merges [1] $ rm a.orig + $ hg status + M a + $ hg resolve -l + U a Change/delete conflict is not allowed $ hg up -qC 3 @@ -536,10 +545,47 @@ updated to hidden changeset 6efa171f091b (hidden revision '6efa171f091b' was rewritten as: d047485b3896) [1] + +Test that statuses are reported properly before and after merge resolution. + $ rm a.orig + $ hg resolve -l + U a + $ hg status + M a + M foo + $ hg revert -r . a + + $ rm a.orig + $ hg resolve -l + U a + $ hg status + M foo + $ hg status -Tjson + [ + { + "itemtype": "file", + "path": "foo", + "status": "M" + } + ] + $ hg resolve -m (no more unresolved files) + $ hg resolve -l + R a + $ hg status + M foo + $ hg status -Tjson + [ + { + "itemtype": "file", + "path": "foo", + "status": "M" + } + ] + Test that 4 is detected as the no-argument destination from 3 and also moves the bookmark with it $ hg up --quiet 0 # we should be able to update to 3 directly