changeset 14753:10dcb3e7cb55 stable

dispatch: return read config options
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:59 +0300
parents 99ace3cb7352
children 189a7562d72e
files mercurial/dispatch.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Jun 24 19:44:58 2011 +0300
+++ b/mercurial/dispatch.py	Fri Jun 24 19:44:59 2011 +0300
@@ -398,6 +398,8 @@
 
 def _parseconfig(ui, config):
     """parse the --config options from the command line"""
+    configs = []
+
     for cfg in config:
         try:
             name, value = cfg.split('=', 1)
@@ -405,10 +407,13 @@
             if not section or not name:
                 raise IndexError
             ui.setconfig(section, name, value)
+            configs.append((section, name, value))
         except (IndexError, ValueError):
             raise util.Abort(_('malformed --config option: %r '
                                '(use --config section.name=value)') % cfg)
 
+    return configs
+
 def _earlygetopt(aliases, args):
     """Return list of values for an option (or aliases).