2462 M = modified |
2462 M = modified |
2463 A = added |
2463 A = added |
2464 R = removed |
2464 R = removed |
2465 ! = deleted, but still tracked |
2465 ! = deleted, but still tracked |
2466 ? = not tracked |
2466 ? = not tracked |
2467 """ |
2467 I = ignored (not shown by default) |
2468 |
2468 """ |
|
2469 |
|
2470 show_ignored = opts['ignored'] and True or False |
2469 files, matchfn, anypats = matchpats(repo, pats, opts) |
2471 files, matchfn, anypats = matchpats(repo, pats, opts) |
2470 cwd = (pats and repo.getcwd()) or '' |
2472 cwd = (pats and repo.getcwd()) or '' |
2471 modified, added, removed, deleted, unknown = [ |
2473 modified, added, removed, deleted, unknown, ignored = [ |
2472 [util.pathto(cwd, x) for x in n] |
2474 [util.pathto(cwd, x) for x in n] |
2473 for n in repo.changes(files=files, match=matchfn)] |
2475 for n in repo.changes(files=files, match=matchfn, |
|
2476 show_ignored=show_ignored)] |
2474 |
2477 |
2475 changetypes = [('modified', 'M', modified), |
2478 changetypes = [('modified', 'M', modified), |
2476 ('added', 'A', added), |
2479 ('added', 'A', added), |
2477 ('removed', 'R', removed), |
2480 ('removed', 'R', removed), |
2478 ('deleted', '!', deleted), |
2481 ('deleted', '!', deleted), |
2479 ('unknown', '?', unknown)] |
2482 ('unknown', '?', unknown), |
|
2483 ('ignored', 'I', ignored)] |
2480 |
2484 |
2481 end = opts['print0'] and '\0' or '\n' |
2485 end = opts['print0'] and '\0' or '\n' |
2482 |
2486 |
2483 for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]] |
2487 for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]] |
2484 or changetypes): |
2488 or changetypes): |
2950 [('m', 'modified', None, _('show only modified files')), |
2954 [('m', 'modified', None, _('show only modified files')), |
2951 ('a', 'added', None, _('show only added files')), |
2955 ('a', 'added', None, _('show only added files')), |
2952 ('r', 'removed', None, _('show only removed files')), |
2956 ('r', 'removed', None, _('show only removed files')), |
2953 ('d', 'deleted', None, _('show only deleted (but tracked) files')), |
2957 ('d', 'deleted', None, _('show only deleted (but tracked) files')), |
2954 ('u', 'unknown', None, _('show only unknown (not tracked) files')), |
2958 ('u', 'unknown', None, _('show only unknown (not tracked) files')), |
|
2959 ('i', 'ignored', None, _('show ignored files')), |
2955 ('n', 'no-status', None, _('hide status prefix')), |
2960 ('n', 'no-status', None, _('hide status prefix')), |
2956 ('0', 'print0', None, |
2961 ('0', 'print0', None, |
2957 _('end filenames with NUL, for use with xargs')), |
2962 _('end filenames with NUL, for use with xargs')), |
2958 ('I', 'include', [], _('include names matching the given patterns')), |
2963 ('I', 'include', [], _('include names matching the given patterns')), |
2959 ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
2964 ('X', 'exclude', [], _('exclude names matching the given patterns'))], |