##// END OF EJS Templates
keyword: lowercase status flags of untracked files in kwfile output...
Christian Ebert -
r8956:4b8d8f19 default
parent child Browse files
Show More
@@ -369,17 +369,27 b' def files(ui, repo, *pats, **opts):'
369 for expansion.
369 for expansion.
370
370
371 Use -u/--untracked to display untracked filenames as well.
371 Use -u/--untracked to display untracked filenames as well.
372
373 With -a/--all and -v/--verbose the codes used to show the status
374 of files are:
375 K = keyword expansion candidate
376 k = keyword expansion candidate (untracked)
377 I = ignored
378 i = ignored (untracked)
372 '''
379 '''
373 kwt = kwtools['templater']
380 kwt = kwtools['templater']
374 status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
381 status = _status(ui, repo, kwt, opts.get('untracked'), *pats, **opts)
375 modified, added, removed, deleted, unknown, ignored, clean = status
382 modified, added, removed, deleted, unknown, ignored, clean = status
376 files = sorted(modified + added + clean + unknown)
383 files = sorted(modified + added + clean)
377 wctx = repo[None]
384 wctx = repo[None]
378 kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
385 kwfiles = [f for f in files if kwt.iskwfile(f, wctx.flags)]
386 kwuntracked = [f for f in unknown if kwt.iskwfile(f, wctx.flags)]
379 cwd = pats and repo.getcwd() or ''
387 cwd = pats and repo.getcwd() or ''
380 kwfstats = not opts.get('ignore') and (('K', kwfiles),) or ()
388 kwfstats = (not opts.get('ignore') and
389 (('K', kwfiles), ('k', kwuntracked),) or ())
381 if opts.get('all') or opts.get('ignore'):
390 if opts.get('all') or opts.get('ignore'):
382 kwfstats += (('I', [f for f in files if f not in kwfiles]),)
391 kwfstats += (('I', [f for f in files if f not in kwfiles]),
392 ('i', [f for f in unknown if f not in kwuntracked]),)
383 for char, filenames in kwfstats:
393 for char, filenames in kwfstats:
384 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
394 fmt = (opts.get('all') or ui.verbose) and '%s %%s\n' % char or '%s\n'
385 for f in filenames:
395 for f in filenames:
General Comments 0
You need to be logged in to leave comments. Login now