Commit Graph

2 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
3eeaf02465 update ui.quiet/verbose/debug/interactive every time the config changes
- ui.quiet/verbose/debug/interactive become just a cache of the ui.cdata
  settings

- the quiet, verbose, debug and interactive options from the [ui] section
  from .hg/hgrc files are respected for commands that open the repo

- setting ui.quiet/verbose/debug/interactive with --config works

- the command line options always override the hgrc settings - previously
  it wasn't possible to override a [ui] debug = True.  --debug still
  takes precedence over --quiet and --verbose.
2006-10-10 18:43:20 -03:00
Alexis S. L. Carvalho
105915ca0d ui.py: untangle updateopts
The code in ui.updateopts that handles ui.quiet, ui.verbose and
ui.debugflag is too smart, making it somewhat hard to see what
are the exact constraints placed on the values of these variables,
hiding some buglets.

This patch makes these constraints more explicit, fixing these
buglets and changing the behaviour slightly.  It also adds a test
to make sure things work as expected in the future.

The buglets:
- setting ui.debug = True in a hgrc wouldn't turn on verbose mode
- additionally, setting ui.quiet = True or using --quiet would give
  you a "quiet debug" mode.

The behaviour change:
- previously, in a hgrc file, ui.quiet wins against ui.verbose (i.e.
  the final result would be quiet mode), but --verbose wins against
  --quiet
- now ui.quiet nullifies ui.verbose and --verbose nullifies --quiet.
  As a consequence, using -qv always gives you normal mode (unless
  debug mode was turned on somewhere)
2006-10-10 18:43:20 -03:00