# HG changeset patch # User Bryan O'Sullivan # Date 1126762332 25200 # Node ID e825dfea382373b84378dcb3ea472a8ae7b27c38 # Parent e6560042b7b8d9a9b21fb0b36c5d8b2070e8e25d Get all commands that operate on files to honour --verbose and --quiet. Fix minor bug in remove command; the when-to-unlink logic was wonky. diff -r e6560042b7b8 -r e825dfea3823 mercurial/commands.py --- a/mercurial/commands.py Wed Sep 14 21:57:41 2005 -0700 +++ b/mercurial/commands.py Wed Sep 14 22:32:12 2005 -0700 @@ -485,6 +485,7 @@ names = [] for src, abs, rel, exact in walk(repo, pats, opts): if exact: + if ui.verbose: ui.status('adding %s\n' % rel) names.append(abs) elif repo.dirstate.state(abs) == '?': ui.status('adding %s\n' % rel) @@ -497,11 +498,11 @@ for src, abs, rel, exact in walk(repo, pats, opts): if src == 'f' and repo.dirstate.state(abs) == '?': add.append(abs) - if not exact: + if ui.verbose or not exact: ui.status('adding ', rel, '\n') if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel): remove.append(abs) - if not exact: + if ui.verbose or not exact: ui.status('removing ', rel, '\n') repo.add(add) repo.remove(remove) @@ -966,7 +967,7 @@ for src, abs, rel, exact in walk(repo, pats, opts): if repo.dirstate.state(abs) == 'a': forget.append(abs) - if not exact: + if ui.verbose or not exact: ui.status('forgetting ', rel, '\n') repo.forget(forget) @@ -1404,8 +1405,8 @@ if c: reason = 'is modified' elif a: reason = 'has been marked for add' elif u: reason = 'is not managed' - if reason and exact: - ui.warn('not removing %s: file %s\n' % (rel, reason)) + if reason: + if exact: ui.warn('not removing %s: file %s\n' % (rel, reason)) else: return True for src, abs, rel, exact in walk(repo, (pat,) + pats, opts):