Better logging for 'manual override' detection.

The first time we notice a file has been overridden, log the old and
new stamp data, which might give a hint about how this happened.

Currently if I do
    rm t/950-curse/countall
    while :; do redo -j10 t/950-curse/all --shuffle || break; done

it will end up complaining that countall has been overridden within
just a few runs, even though it definitely hasn't been.  There seems to
be someone reading a file stamp while someone else is redoing the
file, but I haven't found it yet.
This commit is contained in:
Avery Pennarun 2018-10-12 05:01:07 -04:00
commit d8811601f1

View file

@ -107,6 +107,9 @@ class BuildJob:
newstamp != state.STAMP_MISSING and newstamp != state.STAMP_MISSING and
(sf.stamp != newstamp or sf.is_override)): (sf.stamp != newstamp or sf.is_override)):
state.warn_override(_nice(t)) state.warn_override(_nice(t))
if not sf.is_override:
warn('%s - old: %r\n' % (_nice(t), sf.stamp))
warn('%s - new: %r\n' % (_nice(t), newstamp))
sf.set_override() sf.set_override()
sf.set_checked() sf.set_checked()
sf.save() sf.save()