bad XML in fringe case

Bug #517937 reported by Phil Black on 2010-02-06
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr-xmloutput
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><log><revno>33.1.14</revno>
 <merge>
  <merge><log><revno>33.4.2</revno></log></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

Phil Black (phil-black) wrote :
Guillermo Gonzalez (verterok) wrote :

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!

Changed in bzr-xmloutput:
status: New → Confirmed
importance: Undecided → High
milestone: none → 0.8.6
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers