Mercurial > hg
diff tests/test-revert-interactive.t @ 27985:79139c7a88bd
revert: makes interactive mode ask to forget added files (issue4936)
Before this patch revert interactive mode unconditionally forgets
added files. This patch fixes this by asking user if he wants
to forget added file. If user doesn't want to forget given file,
it is added to matcher_opts exclude list, to not reviewing it
later with other modified files.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Fri, 05 Feb 2016 15:18:40 +0100 |
parents | dcc56e10c23b |
children | 14eee72c8d52 |
line wrap: on
line diff
--- a/tests/test-revert-interactive.t Thu Feb 04 15:38:04 2016 -0800 +++ b/tests/test-revert-interactive.t Fri Feb 05 15:18:40 2016 +0100 @@ -15,6 +15,7 @@ > interactive = true > [extensions] > record = + > purge = > EOF @@ -377,3 +378,26 @@ 5 d +lastline + + $ hg update -C . + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg purge + $ touch newfile + $ hg add newfile + $ hg status + A newfile + $ hg revert -i <<EOF + > n + > EOF + forgetting newfile + forget added file newfile (yn)? n + $ hg status + A newfile + $ hg revert -i <<EOF + > y + > EOF + forgetting newfile + forget added file newfile (yn)? y + $ hg status + ? newfile +