Merge lp://qastaging/~gz/bzrtools/dot_encoding_211104 into lp://qastaging/bzrtools

Proposed by Martin Packman
Status: Needs review
Proposed branch: lp://qastaging/~gz/bzrtools/dot_encoding_211104
Merge into: lp://qastaging/bzrtools
Diff against target: 60 lines (+14/-10)
1 file modified
dotgraph.py (+14/-10)
To merge this branch: bzr merge lp://qastaging/~gz/bzrtools/dot_encoding_211104
Reviewer Review Type Date Requested Status
Richard Wilbur (community) Approve
Aaron Bentley Pending
Review via email: mp+84405@code.qastaging.launchpad.net

Description of the change

Get the dot encoding correct at the graph definition level rather than leaving it till writing to the subprocess pipe. This is needed because invoke_dot_html feeds an output file of dot with layout annotations back in as input to save calculating the layout twice, and would otherwise have to decode it in order to encode it again.

While there, made the writer function accept a filename string as input as an alternative to an iterable of strings, which saves some file lifetime problems in invoke_dot_html as well.

The problem is nice and easy to see using just the bzrtools branch thanks to BenoƮt Pierre appearing.

To post a comment you must log in.
Revision history for this message
Richard Wilbur (richard-wilbur) wrote :

Looks like this is very likely just as relevant as when Martin first proposed merging this branch according to a recent comment on the associated bug.[0]

Good work, Martin!
+1

[0] https://bugs.launchpad.net/bzrtools/+bug/211104/comments/3

review: Approve

Unmerged revisions

783. By Martin Packman

Allow passing a filename to invoke_dot which helps get file lifetimes correct

782. By Martin Packman

Ensure dot is encoded correctly at definition time rather than just before writing to subprocess

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches