Mercurial > hg
changeset 27747:54522bbe1597
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.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 12 Jan 2016 12:43:36 -0800 |
parents | f0e9f38d250f |
children | 81b391a45264 |
files | mercurial/context.py tests/test-status.t |
diffstat | 2 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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