comparison mercurial/commands.py @ 6201:305d4450036a

Extend/correct acc40572da5b regarding -qA and ignored files. hg status -qA will now hide untracked files as described in the doc string.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 02 Mar 2008 13:52:34 +0100
parents acc40572da5b
children 942287cb1f57
comparison
equal deleted inserted replaced
6200:acc40572da5b 6201:305d4450036a
2491 files that match are shown. Files that are clean or ignored or 2491 files that match are shown. Files that are clean or ignored or
2492 source of a copy/move operation, are not listed unless -c (clean), 2492 source of a copy/move operation, are not listed unless -c (clean),
2493 -i (ignored), -C (copies) or -A is given. Unless options described 2493 -i (ignored), -C (copies) or -A is given. Unless options described
2494 with "show only ..." are given, the options -mardu are used. 2494 with "show only ..." are given, the options -mardu are used.
2495 2495
2496 Option -q/--quiet hides untracked files unless explicitly 2496 Option -q/--quiet hides untracked (unknown and ignored) files
2497 requested by -u. 2497 unless explicitly requested with -u/--unknown or -i/-ignored.
2498 2498
2499 NOTE: status may appear to disagree with diff if permissions have 2499 NOTE: status may appear to disagree with diff if permissions have
2500 changed or a merge has occurred. The standard diff format does not 2500 changed or a merge has occurred. The standard diff format does not
2501 report permission changes and diff only reports changes relative 2501 report permission changes and diff only reports changes relative
2502 to one merge parent. 2502 to one merge parent.
2520 2520
2521 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) 2521 files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
2522 cwd = (pats and repo.getcwd()) or '' 2522 cwd = (pats and repo.getcwd()) or ''
2523 modified, added, removed, deleted, unknown, ignored, clean = [ 2523 modified, added, removed, deleted, unknown, ignored, clean = [
2524 n for n in repo.status(node1=node1, node2=node2, files=files, 2524 n for n in repo.status(node1=node1, node2=node2, files=files,
2525 match=matchfn, 2525 match=matchfn,
2526 list_ignored=all or opts['ignored'], 2526 list_ignored=opts['ignored']
2527 list_clean=all or opts['clean'])] 2527 or all and not ui.quiet,
2528 list_clean=opts['clean'] or all,
2529 list_unknown=opts['unknown']
2530 or not (ui.quiet or
2531 opts['modified'] or
2532 opts['added'] or
2533 opts['removed'] or
2534 opts['deleted'] or
2535 opts['ignored']))]
2528 2536
2529 changetypes = (('modified', 'M', modified), 2537 changetypes = (('modified', 'M', modified),
2530 ('added', 'A', added), 2538 ('added', 'A', added),
2531 ('removed', 'R', removed), 2539 ('removed', 'R', removed),
2532 ('deleted', '!', deleted), 2540 ('deleted', '!', deleted),
2538 end = opts['print0'] and '\0' or '\n' 2546 end = opts['print0'] and '\0' or '\n'
2539 2547
2540 for opt, char, changes in ([ct for ct in explicit_changetypes 2548 for opt, char, changes in ([ct for ct in explicit_changetypes
2541 if all or opts[ct[0]]] 2549 if all or opts[ct[0]]]
2542 or changetypes): 2550 or changetypes):
2543
2544 # skip unknown files if -q, but -u and -A have priority over -q
2545 if (not opts['unknown']) and (not opts['all']):
2546 if opt == 'unknown' and ui.quiet:
2547 continue
2548 2551
2549 if opts['no_status']: 2552 if opts['no_status']:
2550 format = "%%s%s" % end 2553 format = "%%s%s" % end
2551 else: 2554 else:
2552 format = "%s %%s%s" % (char, end) 2555 format = "%s %%s%s" % (char, end)