# HG changeset patch # User Martin von Zweigbergk # Date 1452631416 28800 # Node ID 54522bbe15971ec3b063b2897e452af5faa06249 # Parent f0e9f38d250fb40ab835cb8c8c2acca8aed545bc status: back out changeset 89f49813526c This backs out 89f49813526c (status: change + back out == clean (API), 2016-01-04). Although correct, it turned out that it was just too slow. For example, 'hg status --rev .~1000 --rev .' on the Mozilla repo went from <1s to >30s on cold disk. So we go back to reporting reverted changes as modified instead of clean. These are rare anyway, as suggested by the fact that it had been broken since before Mercurial 2.0. diff -r f0e9f38d250f -r 54522bbe1597 mercurial/context.py --- a/mercurial/context.py Tue Jan 12 13:43:41 2016 -0800 +++ b/mercurial/context.py Tue Jan 12 12:43:36 2016 -0800 @@ -140,9 +140,15 @@ added.append(fn) elif node2 is None: removed.append(fn) + elif node2 != _newnode: + # 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. modified.append(fn) else: clean.append(fn) diff -r f0e9f38d250f -r 54522bbe1597 tests/test-status.t --- a/tests/test-status.t Tue Jan 12 13:43:41 2016 -0800 +++ b/tests/test-status.t Tue Jan 12 12:43:36 2016 -0800 @@ -390,14 +390,6 @@ reverting file #endif -reverted and commit change should appear clean - - $ hg ci -m a - $ hg status -A --rev 0 --rev 2 - C file - - $ cd .. - hg status of binary file starting with '\1\n', a separator for metadata: $ hg init repo5