Mercurial > hg-stable
diff mercurial/dispatch.py @ 8023:fd9debb3ea1b
profiling: Adding a profiling.format config variable
Allows defining other output formats for profiling.
If an invalid format is given, output a warning and ignore it.
For now, only the standard 'text' value is supported.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Thu, 02 Apr 2009 16:01:30 +0900 |
parents | 4f3fdfaa3874 |
children | 9a1b86cfd29e |
line wrap: on
line diff
--- a/mercurial/dispatch.py Wed Apr 08 14:19:41 2009 +0200 +++ b/mercurial/dispatch.py Thu Apr 02 16:01:30 2009 +0900 @@ -379,6 +379,13 @@ raise error.ParseError(cmd, _("invalid arguments")) if options['profile']: + format = ui.config('profiling', 'format', default='text') + + if not format in ['text']: + ui.warn(_("unrecognized profiling format '%s'" + " - Ignored\n") % format) + format = 'text' + output = ui.config('profiling', 'output') if output: