bzr config fails to unquote non-string values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Vincent Ladeuil |
Bug Description
With the recent support for proper quoting (so to speak ;) a new failure mode has been introduced leading to 'bzr config' crashing:
bzr config
locations:
[/home/
post_commit_to = <email address hidden>
news_merge_files = doc/en/
mypush = lp:~vila/bzr/{basename}
branch:
parent_location = bzr+ssh:
gtk_global_
gtk_file_
push_location = bzr+ssh:
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/home/
return the_callable(*args, **kwargs)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
return self._operation
File "/home/
self.cleanups, self.func, *args, **kwargs)
File "/home/
result = func(*args, **kwargs)
File "/home/
result = func(*args, **kwargs)
File "/home/
self.
File "/home/
value = store.unquote(
File "/home/
value = self._config_
File "/home/
if (value[0] == value[-1]) and (value[0] in ('"', "'")):
File "/home/
val = dict.__
KeyError: 0
bzr 2.5.0dev5 on python 2.7.2 (Linux-
Ubuntu-
arguments: ['/home/
plugins: bash_completion
builddeb[
changelog_
email[unknown], explorer[1.2.1], gardener[1.0.0dev], graph[1.0.0],
grep[0.5.0dev], gtk[0.101.0dev], guess[unknown], hg[0.2.0dev],
launchpad[
netrc_
po_
stats[
update_
webdav[
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.
Annoying but rather trivial to fix, the culprit being the very naive implementation of unquote in configobj
Related branches
- Jelmer Vernooij (community): Approve
-
Diff: 56 lines (+23/-2)3 files modifiedbzrlib/config.py (+3/-2)
bzrlib/tests/test_config.py (+16/-0)
doc/en/release-notes/bzr-2.5.txt (+4/-0)
Changed in bzr: | |
milestone: | none → 2.5b5 |
status: | In Progress → Fix Released |