configuration values are not properly escaped, with hash signs being treated as comments
Bug #86838 reported by
Christopher Armstrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Matt Nordhoff |
Bug Description
I have a locations.conf with some custom config options which require quotation of the values, for a bzr plugin I have.
The values generally begin with hash marks (#) as they are IRC channels, so they need to be quoted in order for the config file parser to not ignore them. However, when I push a new branch and locations.conf gets rewritten, it strips out the quote marks I have around those values. Then the next time I try to run bzr I get syntax errors about locations.conf.
Related branches
lp:~mnordhoff/bzr/configobj-4.5.1
(Merged)
Changed in bzr: | |
status: | New → Confirmed |
Changed in bzr: | |
assignee: | nobody → mnordhoff |
importance: | Undecided → Low |
milestone: | none → 1.3 |
status: | Confirmed → Fix Released |
To post a comment you must log in.
A simple test case for this problem:
>>> from bzrlib.branch import Branch set_user_ option( 'foo', 'abc#def') get_user_ option( 'foo')
>>> b = Branch.open('.')
>>> config = b.get_config()
>>> config.
>>> config.
u'abc'
I can reproduce this with bzr-1.0 and bzr.dev r3211. In both cases, the following gets written to the configuration file:
foo = abc#def