mercurial/commands.py
changeset 6200 acc40572da5b
parent 6192 cd65a67aff31
child 6201 305d4450036a
--- a/mercurial/commands.py	Fri Feb 29 14:48:21 2008 -0800
+++ b/mercurial/commands.py	Sat Mar 01 22:30:03 2008 +0100
@@ -2493,6 +2493,9 @@
     -i (ignored), -C (copies) or -A is given.  Unless options described
     with "show only ..." are given, the options -mardu are used.
 
+    Option -q/--quiet hides untracked files unless explicitly
+    requested by -u.
+
     NOTE: status may appear to disagree with diff if permissions have
     changed or a merge has occurred. The standard diff format does not
     report permission changes and diff only reports changes relative
@@ -2537,6 +2540,12 @@
     for opt, char, changes in ([ct for ct in explicit_changetypes
                                 if all or opts[ct[0]]]
                                or changetypes):
+
+        # skip unknown files if -q, but -u and -A have priority over -q
+        if (not opts['unknown']) and (not opts['all']):
+            if opt == 'unknown' and ui.quiet:
+                continue
+
         if opts['no_status']:
             format = "%%s%s" % end
         else: