Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 6200:acc40572da5b
'hg status -q' output skips non-tracked files.
The '-q' flag was ignored in status command. But this flag
can be used to hide non-tracked files in hg status output.
This small correction makes status command more general,
similar to 'svn status', where '-q' flag has the same effect.
The '-u' and '-A' flags have priority over '-q'.
A testcase and doc-string for status was extended to cover
'-q' flag.
author | Zoran Bosnjak <zoran.bosnjak@via.si> |
---|---|
date | Sat, 01 Mar 2008 22:30:03 +0100 |
parents | cd65a67aff31 |
children | 305d4450036a |
comparison
equal
deleted
inserted
replaced
6199:0068809347d7 | 6200:acc40572da5b |
---|---|
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 | |
2497 requested by -u. | |
2498 | |
2496 NOTE: status may appear to disagree with diff if permissions have | 2499 NOTE: status may appear to disagree with diff if permissions have |
2497 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 |
2498 report permission changes and diff only reports changes relative | 2501 report permission changes and diff only reports changes relative |
2499 to one merge parent. | 2502 to one merge parent. |
2500 | 2503 |
2535 end = opts['print0'] and '\0' or '\n' | 2538 end = opts['print0'] and '\0' or '\n' |
2536 | 2539 |
2537 for opt, char, changes in ([ct for ct in explicit_changetypes | 2540 for opt, char, changes in ([ct for ct in explicit_changetypes |
2538 if all or opts[ct[0]]] | 2541 if all or opts[ct[0]]] |
2539 or changetypes): | 2542 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 | |
2540 if opts['no_status']: | 2549 if opts['no_status']: |
2541 format = "%%s%s" % end | 2550 format = "%%s%s" % end |
2542 else: | 2551 else: |
2543 format = "%s %%s%s" % (char, end) | 2552 format = "%s %%s%s" % (char, end) |
2544 | 2553 |