Merge lp://staging/~gz/bzrtools/dot_encoding_211104 into lp://staging/bzrtools
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~gz/bzrtools/dot_encoding_211104 |
Merge into: | lp://staging/bzrtools |
Diff against target: |
60 lines (+14/-10) 1 file modified
dotgraph.py (+14/-10) |
To merge this branch: | bzr merge lp://staging/~gz/bzrtools/dot_encoding_211104 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Wilbur (community) | Approve | ||
Aaron Bentley | Pending | ||
Review via email: mp+84405@code.staging.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.
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
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