Mercurial > hg
changeset 27748:81b391a45264
context: clarify why we don't compare file contents when nodeid differs
See previous commit for timing information.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 12 Jan 2016 13:09:54 -0800 |
parents | 54522bbe1597 |
children | 215b47449e47 |
files | mercurial/context.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Tue Jan 12 12:43:36 2016 -0800 +++ b/mercurial/context.py Tue Jan 12 13:09:54 2016 -0800 @@ -140,15 +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. + elif self.rev() is not None: + # When comparing files between two commits, we save time by + # not comparing the file contents when the nodeids differ. + # Note that this means we incorrectly report a reverted change + # to a file as a modification. 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)