ConfigObj is able to write bad branch.conf which is not possible to read back
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Bazaar | Status tracked in Trunk | |||||
2.2 |
Fix Released
|
High
|
Alexander Belchenko | |||
2.3 |
Fix Released
|
High
|
Alexander Belchenko | |||
Trunk |
Fix Released
|
High
|
Alexander Belchenko | |||
Configobj |
Confirmed
|
Undecided
|
Unassigned | |||
QBzr |
Won't Fix
|
Medium
|
Unassigned | |||
configobj (Debian) |
Fix Released
|
Unknown
|
||||
configobj (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is for v 2.1.0, and I haven't tried to reproduce it under the latest version, but this is such an odd case it may not have been encountered...
Steps to reproduce:
Have files with changes ready to commit.
Accidentally commit them with -F pointing to the output of "bzr diff" instead of to the file containing the commit message.
Notice the bad commit message.
Attempt to repair it by doing uncommit.
Get the error shown below.
In case this depends on the exact contents of the diff, I'll attach it.
FYA, actually, the full steps that caused this were:
Have files with changes ready to commit.
Accidentally commit them with -F pointing to the output of "bzr diff" instead of to the file containing the commit message.
Do another commit on top of that.
Push to launchpad, where the branch is awaiting review for a merge proposal.
Notice the bad commit message on the merge proposal page on launchpad.
Post, "Oops, let me just fix that commit message" comment.
Do uncommit of the last commit, which has a normal message.
Attempt to uncommit the one with the bad message.
Get the error shown below.
Go "Eek!"
Do "bzr branch -r <revision before the bad message>" into a fresh directory.
File the requested bug report while waiting for branch to complete.
Hope to go on to next step:
Copy in changed files from working tree of branch with the toxic commit message.
=======
bzr: ERROR: bzrlib.
several errors.
First error at line 155.
Traceback (most recent call last):
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "C:/Program Files/Bazaar/
File "C:/Program Files/Bazaar/
File "C:/Program Files/Bazaar/
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
File "bzrlib\
ConfigObjError: Parsing failed with several errors.
First error at line 155.
bzr 2.1.0 on python 2.5.4 (Windows-
arguments: ['c:\\Program Files\\
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
bzrtools C:\Program Files\Bazaar\
explorer C:\Program Files\Bazaar\
launchpad C:\Program Files\Bazaar\
netrc_
qbzr C:\Program Files\Bazaar\
rebase C:\Program Files\Bazaar\
svn C:\Program Files\Bazaar\
upload C:\Program Files\Bazaar\
xmloutput C:\Program Files\Bazaar\
Related branches
- John A Meinel: Approve
- Vincent Ladeuil: Approve
- Martin Pool: Approve
-
Diff: 74 lines (+35/-3)3 files modifiedNEWS (+4/-0)
bzrlib/tests/test_config.py (+27/-1)
bzrlib/util/configobj/configobj.py (+4/-2)
- Martin Pool: Approve
-
Diff: 75 lines (+35/-3)3 files modifiedbzrlib/tests/test_config.py (+27/-1)
bzrlib/util/configobj/configobj.py (+4/-2)
doc/en/release-notes/bzr-2.2.txt (+4/-0)
affects: | bzr → qbzr |
tags: | added: configobj |
Changed in bzr: | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Alexander Belchenko (bialix) |
milestone: | none → 2.2.5 |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
Changed in configobj: | |
status: | New → Confirmed |
Changed in configobj (Ubuntu): | |
status: | New → Confirmed |
Changed in configobj (Debian): | |
status: | Unknown → Confirmed |
Changed in configobj (Debian): | |
status: | Confirmed → Fix Released |
Changed in qbzr: | |
importance: | High → Medium |
Changed in qbzr: | |
status: | Confirmed → Won't Fix |
please attach branch.conf from .bzr/branch/ branch. conf in your affected tree. If that file contains sensitive information please remove it. I'm interested in [commit_data] section.