Skip to content

Commit

Permalink
Added docstring to File.changed_timestamp_then_content()include a not…
Browse files Browse the repository at this point in the history
…e and reference to issue SCons#2980
  • Loading branch information
bdbaddog committed Jul 11, 2018
1 parent 7025831 commit fb7a4cf
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/engine/SCons/Node/FS.py
Expand Up @@ -3250,11 +3250,24 @@ def changed_state(self, target, prev_ni):
return self.state != SCons.Node.up_to_date

def changed_timestamp_then_content(self, target, prev_ni):
"""
Used when decider for file is Timestamp-MD5
NOTE: If the timestamp hasn't change this will skip md5'ing the
file and just copy the prev_ni provided. If the prev_ni
is wrong. It will propogate it.
See: https://github.com/SCons/scons/issues/2980
Args:
self - self
target -
prev_ni - The NodeInfo object loaded from previous builds .sconsign
Returns:
Boolean - Indicates if node(File) has changed.
"""
if not self.changed_timestamp_match(target, prev_ni):
try:
if str(self) == 'beta.h' and prev_ni.csig == '2ff783593a2224d0574181661ab5f1b7':
print("in problem code")
print('Setting csig [%s]:%s'%(str(self),prev_ni.csig))
self.get_ninfo().csig = prev_ni.csig
except AttributeError:
pass
Expand Down

0 comments on commit fb7a4cf

Please sign in to comment.