2018-11-14 10:52:04 -08:00
|
|
|
#!/usr/bin/env python2
|
2010-12-11 07:02:45 -08:00
|
|
|
import sys, os
|
|
|
|
|
import vars, state
|
Raw logs contain @@REDO lines instead of formatted data.
This makes them more reliable to parse. redo-log can parse each line,
format and print it, then recurse if necessary. This got a little ugly
because I wanted 'redo --raw-logs' to work, which we want to format the
output nicely, but not call redo-log.
(As a result, --raw-logs has a different meaning to redo and
redo-log, which is kinda dumb. I should fix that.)
As an added bonus, redo-log now handles indenting of recursive logs, so
if the build was a -> a/b -> a/b/c, and you look at the log for a/b, it
can still start at the top level indentation.
2018-11-13 04:05:42 -05:00
|
|
|
from logs import err
|
2010-12-11 07:02:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
2010-12-11 23:00:53 -08:00
|
|
|
me = os.path.join(vars.STARTDIR,
|
|
|
|
|
os.path.join(vars.PWD, vars.TARGET))
|
|
|
|
|
f = state.File(name=me)
|
|
|
|
|
f.add_dep('m', state.ALWAYS)
|
2010-12-11 07:02:45 -08:00
|
|
|
always = state.File(name=state.ALWAYS)
|
|
|
|
|
always.stamp = state.STAMP_MISSING
|
|
|
|
|
always.set_changed()
|
|
|
|
|
always.save()
|
|
|
|
|
state.commit()
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
sys.exit(200)
|