diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -144,6 +144,8 @@ class basectx(object): # The file was not a new file in mf2, so an entry # from diff is really a difference. modified.append(fn) + elif flag1 != flag2: + modified.append(fn) elif self[fn].cmp(other[fn]): # node2 was newnode, but the working file doesn't # match the one in mf1. diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -362,6 +362,34 @@ hg status -A --change 1 and revset: $ cd .. +hg status with --rev and reverted changes: + + $ hg init reverted-changes-repo + $ cd reverted-changes-repo + $ echo a > file + $ hg add file + $ hg ci -m a + $ echo b > file + $ hg ci -m b + +reverted file should appear clean + + $ hg revert -r 0 . + reverting file + $ hg status -A --rev 0 + C file + +#if execbit +reverted file with changed flag should appear modified + + $ chmod +x file + $ hg status -A --rev 0 + M file + +#endif + + $ cd .. + hg status of binary file starting with '\1\n', a separator for metadata: $ hg init repo5