comparison mercurial/context.py @ 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 c183f7b79541
children b7af616ca675
comparison
equal deleted inserted replaced
27940:cfe7da66f555 27941:75fa75d31495
140 added.append(fn) 140 added.append(fn)
141 elif node2 is None: 141 elif node2 is None:
142 removed.append(fn) 142 removed.append(fn)
143 elif flag1 != flag2: 143 elif flag1 != flag2:
144 modified.append(fn) 144 modified.append(fn)
145 elif self.rev() is not None: 145 elif node2 != _newnode:
146 # When comparing files between two commits, we save time by 146 # When comparing files between two commits, we save time by
147 # not comparing the file contents when the nodeids differ. 147 # not comparing the file contents when the nodeids differ.
148 # Note that this means we incorrectly report a reverted change 148 # Note that this means we incorrectly report a reverted change
149 # to a file as a modification. 149 # to a file as a modification.
150 modified.append(fn) 150 modified.append(fn)