[PATCH 3 of 3] keyword: clean up quiet setting in kwdemo and adding of untracked kwfiles

Christian Ebert blacktrash at gmx.net
Wed Jan 9 10:39:27 UTC 2008


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1199852673 -3600
# Node ID 5b8387948b9b4536328f970b3164d5da0b9c3c0a
# Parent  bb2ef948e59499ed07f7b51c069574be94d8d1fa
keyword: clean up quiet setting in kwdemo and adding of untracked kwfiles

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -328,8 +328,7 @@ def demo(ui, repo, *args, **opts):
     ui.note('\nhg -R "%s" branch "%s"\n' % (tmpdir, branchname))
     # silence branch command if not verbose
     quiet = ui.quiet
-    verbose = ui.verbose
-    ui.quiet = not verbose
+    ui.quiet = not ui.verbose
     commands.branch(ui, repo, branchname)
     ui.quiet = quiet
     for name, cmd in ui.configitems('hooks'):
@@ -363,10 +362,9 @@ def files(ui, repo, *pats, **opts):
     '''
     status = _status(ui, repo, *pats, **opts)
     modified, added, removed, deleted, unknown, ignored, clean = status
+    files = modified + added + clean
     if opts.get('untracked'):
-        files = modified + added + unknown + clean
-    else:
-        files = modified + added + clean
+        files += unknown
     files.sort()
     kwfiles = [f for f in files if _iskwfile(f, repo._link)]
     cwd = pats and repo.getcwd() or ''



More information about the Mercurial-devel mailing list