Mercurial > hg-stable
changeset 22135:37d2bd2c04f6
test-revert: add case where file is unchanged between "base" and "parent"
This test highlights a minor misbehavior in the message displayed
during an explicit revert with a target revision.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 27 Jun 2014 18:00:49 +0200 |
parents | d732ff677b96 |
children | a29574cb8552 |
files | tests/test-revert.t |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-revert.t Wed Jun 25 17:37:13 2014 +0100 +++ b/tests/test-revert.t Fri Jun 27 18:00:49 2014 +0200 @@ -435,6 +435,8 @@ > # content of the file in "base" and "parent" > # None means no file at all > ctxcontent = { + > # clean: no change from base to parent + > 'clean': ['base', 'base'], > # modified: file content change from base to parent > 'modified': ['base', 'parent'], > # added: file is missing from base and added in parent @@ -490,6 +492,7 @@ $ python gen-revert-cases.py filelist added_clean + clean_clean modified_clean Script to make a simple text version of the content @@ -517,8 +520,10 @@ $ python ../gen-revert-cases.py base $ hg addremove --similarity 0 + adding clean_clean adding modified_clean $ hg status + A clean_clean A modified_clean $ hg commit -m 'base' @@ -526,6 +531,7 @@ $ python ../dircontent.py > ../content-base.txt $ cat ../content-base.txt + base clean_clean base modified_clean Create parent changeset @@ -543,6 +549,7 @@ $ python ../dircontent.py > ../content-parent.txt $ cat ../content-parent.txt parent added_clean + base clean_clean parent modified_clean Setup working directory @@ -560,6 +567,7 @@ $ python ../dircontent.py > ../content-wc.txt $ cat ../content-wc.txt parent added_clean + base clean_clean parent modified_clean $ cd .. @@ -629,6 +637,9 @@ ### revert for: added_clean no changes needed to added_clean + ### revert for: clean_clean + no changes needed to clean_clean + ### revert for: modified_clean no changes needed to modified_clean @@ -652,6 +663,12 @@ revert all files individually and check the output (output is expected to be different than in the --all case) +Misbehavior: + +- fails to report no change to revert for +| +| - clean_clean + $ for file in `python ../gen-revert-cases.py filelist`; do > echo '### revert for:' $file; > hg revert $file --rev 'desc(base)'; @@ -659,6 +676,8 @@ > done ### revert for: added_clean + ### revert for: clean_clean + ### revert for: modified_clean