2010-12-19 03:17:18 -08:00
|
|
|
import sys, os
|
2018-12-11 00:55:05 +00:00
|
|
|
from . import deps, env, logs, state
|
2010-12-19 03:17:18 -08:00
|
|
|
|
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():
|
2018-12-05 01:07:16 -05:00
|
|
|
if len(sys.argv[1:]) != 0:
|
2018-12-11 00:55:05 +00:00
|
|
|
sys.stderr.write('%s: no arguments expected.\n' % sys.argv[0])
|
2018-12-05 01:07:16 -05:00
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
state.init([])
|
2018-12-11 00:55:05 +00:00
|
|
|
logs.setup(tty=sys.stderr, pretty=env.v.PRETTY, color=env.v.COLOR)
|
2018-12-02 23:15:37 -05:00
|
|
|
cwd = os.getcwd()
|
|
|
|
|
for f in state.files():
|
|
|
|
|
if f.is_target():
|
|
|
|
|
if deps.isdirty(f,
|
|
|
|
|
depth='',
|
2018-12-05 01:07:16 -05:00
|
|
|
max_changed=env.v.RUNID,
|
2018-12-02 23:15:37 -05:00
|
|
|
already_checked=[],
|
|
|
|
|
is_checked=is_checked,
|
|
|
|
|
set_checked=set_checked,
|
|
|
|
|
log_override=log_override):
|
2018-12-05 01:07:16 -05:00
|
|
|
print state.relpath(os.path.join(env.v.BASE, f.name), cwd)
|
2018-12-02 23:15:37 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|