Comments
Patch
@@ -433,10 +433,12 @@ Write the python script to disk
> import os
>
> # 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
> 'added': [None, 'parent'],
> }
@@ -488,10 +490,11 @@ Write the python script to disk
check list of planned files
$ python gen-revert-cases.py filelist
added_clean
+ clean_clean
modified_clean
Script to make a simple text version of the content
---------------------------------------------------
@@ -515,19 +518,22 @@ Generate appropriate repo state
Generate base changeset
$ 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'
(create a simple text version of the content)
$ python ../dircontent.py > ../content-base.txt
$ cat ../content-base.txt
+ base clean_clean
base modified_clean
Create parent changeset
$ python ../gen-revert-cases.py parent
@@ -541,10 +547,11 @@ Create parent changeset
(create a simple text version of the content)
$ python ../dircontent.py > ../content-parent.txt
$ cat ../content-parent.txt
parent added_clean
+ base clean_clean
parent modified_clean
Setup working directory
$ python ../gen-revert-cases.py wc | cat
@@ -558,10 +565,11 @@ Setup working directory
(create a simple text version of the content)
$ python ../dircontent.py > ../content-wc.txt
$ cat ../content-wc.txt
parent added_clean
+ base clean_clean
parent modified_clean
$ cd ..
Test revert --all to parent content
@@ -627,10 +635,13 @@ revert all files individually and check
> echo
> done
### 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
check resulting directory againt the --all run
@@ -650,17 +661,25 @@ Test revert to "base" content with expli
$ cd revert-base-explicit
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)';
> echo
> done
### revert for: added_clean
+ ### revert for: clean_clean
+
### revert for: modified_clean
check resulting directory againt the --all run
(There should be no difference)