[issue1829] Whitespace breaks config.pyc ?
thorr18
mercurial-bugs at selenic.com
Fri Sep 11 01:22:08 UTC 2009
New submission from thorr18 <BryceEMiller+fty at gmail.com>:
If a tab or space is present on the first line after a section header in
mercurial.ini, hg fails. Whether the whitespace was intentional or
accidental, I believe hg should at least provide a more meaningful error
message if it has trouble reading the config file.
The first example config section show below does not cause hg to fail.
The second and third examples do fail.
-------------------------
[section_runs_fine]
X.1 = y.1
X.2 = y.2
X.3 = y.3
[section_fails_with_space]
X.1 = y.1
X.2 = y.2
X.3 = y.3
[section_fails_with_tab]
X.1 = y.1
X.2 = y.2
X.3 = y.3
-------------------------
When I ran hg I got:
------------------------
Traceback (most recent call last):
File "hg", line 38, in <module>
File "mercurial\dispatch.pyc", line 16, in run
File "mercurial\dispatch.pyc", line 21, in dispatch
File "mercurial\ui.pyc", line 36, in __init__
File "mercurial\ui.pyc", line 73, in readconfig
File "mercurial\config.pyc", line 137, in read
File "mercurial\config.pyc", line 92, in parse
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
------------------------
thanks
----------
messages: 10495
nosy: thorr18
priority: bug
status: unread
title: Whitespace breaks config.pyc ?
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1829>
____________________________________________________
More information about the Mercurial-devel
mailing list