2018-11-14 10:52:04 -08:00
|
|
|
#!/usr/bin/env python2
|
2010-12-19 03:17:18 -08:00
|
|
|
import sys, os
|
|
|
|
|
|
|
|
|
|
import vars_init
|
|
|
|
|
vars_init.init([])
|
|
|
|
|
|
|
|
|
|
import vars, state, deps
|
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-19 03:17:18 -08:00
|
|
|
|
|
|
|
|
if len(sys.argv[1:]) != 0:
|
|
|
|
|
err('%s: no arguments expected.\n' % sys.argv[0])
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
2010-12-19 03:39:37 -08:00
|
|
|
|
|
|
|
|
cache = {}
|
|
|
|
|
|
2018-12-02 16:53:05 -05:00
|
|
|
|
2010-12-19 03:39:37 -08:00
|
|
|
def is_checked(f):
|
|
|
|
|
return cache.get(f.id, 0)
|
|
|
|
|
|
2018-12-02 16:53:05 -05:00
|
|
|
|
2010-12-19 03:39:37 -08:00
|
|
|
def set_checked(f):
|
|
|
|
|
cache[f.id] = 1
|
|
|
|
|
|
|
|
|
|
|
2018-12-02 16:53:05 -05:00
|
|
|
def log_override(name):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2018-12-02 23:15:37 -05:00
|
|
|
def main():
|
|
|
|
|
cwd = os.getcwd()
|
|
|
|
|
for f in state.files():
|
|
|
|
|
if f.is_target():
|
|
|
|
|
if deps.isdirty(f,
|
|
|
|
|
depth='',
|
|
|
|
|
max_changed=vars.RUNID,
|
|
|
|
|
already_checked=[],
|
|
|
|
|
is_checked=is_checked,
|
|
|
|
|
set_checked=set_checked,
|
|
|
|
|
log_override=log_override):
|
|
|
|
|
print state.relpath(os.path.join(vars.BASE, f.name), cwd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|