bad XML in fringe case
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bzr-xmloutput |
Triaged
|
High
|
Unassigned |
Bug Description
I have a fringe case where xmloutput generates illegal XML. When trying to list just a subrevision and a parent of a file, I get XML like:
<logs><
<merge>
<merge>
</log>
</merge>
</logs>
This is obviously wrong. The last log and merge closing tags should be swapped. It stems from file that has a revision history like
36 <-- merge depth 0
33.1.14 <-- merge depth 1
33.4.2 <-- merge depth 3
33.3.1 < -- merge depth 2
33.1.17 <-- mrege depth 1
35 <-- merge depth 0
I believe I have a fix, I've attached a patch.
The trouble stems from the end_log code which assumes that it needs to close a log tag for every merge tag it closes.
Related branches
- Guillermo Gonzalez: Approve
-
Diff: 252 lines (+48/-108)2 files modifiedlogxml.py (+26/-92)
tests/test_log_xml.py (+22/-16)
Changed in bzr-xmloutput: | |
milestone: | 0.8.6 → 0.8.7 |
Changed in bzr-xmloutput: | |
milestone: | 0.8.7 → later |
Changed in bzr-xmloutput: | |
status: | Confirmed → Triaged |
Changed in bzr-xmloutput: | |
milestone: | 0.8.8 → none |
Changed in bzr-xmloutput: | |
milestone: | none → 0.9 |
Hi,
Thanks for reporting this issue, and attching a patch!
The patch looks reasonable
is there a chance that you could add a test case?
if not, could you detail the steps to reproduce? (command args, etc)
Thanks!