Mercurial > hg
changeset 27941:75fa75d31495 stable
context: back out sneaky code change in documentation change
In 81b391a45264 (context: clarify why we don't compare file contents
when nodeid differs, 2016-01-12), I also changed "node2 != _newnode"
into "self.rev() is not None". I don't remember why. They are similar,
but the former also catches the case where the file is clean in the
dirstate (so node2 is not _newnode), but different from the "other"
context. This resulted in unnecessary file content comparison a few
lines further down in the code. Let's just back out the code change.
Thanks to Durham Goode for spotting this.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 25 Jan 2016 15:48:35 -0800 |
parents | cfe7da66f555 |
children | eb1135d5e688 |
files | mercurial/context.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Jul 23 23:41:29 2015 +0900 +++ b/mercurial/context.py Mon Jan 25 15:48:35 2016 -0800 @@ -142,7 +142,7 @@ removed.append(fn) elif flag1 != flag2: modified.append(fn) - elif self.rev() is not None: + elif node2 != _newnode: # 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