Mercurial > hg
diff mercurial/dispatch.py @ 28081:a6344df5108e
dispatch: strip command line options like config file options
Currently, whitespace in command line --config options are considered
significant while whitespace in config files are not considered
significant. This diff strips the leading and trailing whitespace from
command line config options.
author | Tony Tung <ttung@fb.com> |
---|---|
date | Mon, 08 Feb 2016 15:35:30 -0800 |
parents | 6822f9382b4c |
children | 59509c6724c7 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Thu Feb 11 22:52:23 2016 -0800 +++ b/mercurial/dispatch.py Mon Feb 08 15:35:30 2016 -0800 @@ -609,7 +609,8 @@ for cfg in config: try: - name, value = cfg.split('=', 1) + name, value = [cfgelem.strip() + for cfgelem in cfg.split('=', 1)] section, name = name.split('.', 1) if not section or not name: raise IndexError