1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Description: Work around dot rendering bug
This patch from causes monotone-viz to use "rankdir=BT" rather than the -y
option to dot to flip the revision graph's direction. The -y option to dot
broke previously (Debian bug #573781) causing displaced arrows. The problem in
dot has since been fixed, but it's still possible people might encounter it.
Also, it looks like this patch will be committed upstream anyway.
Author: Stéphane Gimenez <dev@gim.name>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573634
Index: monotone-viz-1.0.2.orig/agraph.ml
===================================================================
--- monotone-viz-1.0.2.orig.orig/agraph.ml 2010-07-14 04:08:57.769153696 +0100
+++ monotone-viz-1.0.2.orig/agraph.ml 2010-07-14 04:08:59.882151155 +0100
@@ -50,8 +50,9 @@
agraph.nodes in
!+ "digraph \"monotone-viz\"\n{\n" ;
- if params.lr_layout then
- !+ " graph [rankdir=LR] ;\n" ;
+ if params.lr_layout
+ then !+ " graph [rankdir=LR] ;\n"
+ else !+ " graph [rankdir=BT] ;\n" ;
!+ " graph [ranksep=\"0.25\"] ;\n" ;
!+ " node [label=\"\"] ;\n" ;
@@ -222,11 +223,11 @@
let dot_prg = graph.layout_params.dot_program in
let cmd =
if Viz_misc.debug "dot"
- then [ "/bin/sh" ; "-c" ;
+ then [ "/bin/bash" ; "-c" ;
Printf.sprintf
"set -o pipefail ; \
- tee agraph.in.dot | %s -q -y -s%.0f | tee agraph.out.dot" dot_prg ppi ]
- else [ dot_prg ; "-q" ; "-y" ; Printf.sprintf "-s%.0f" ppi ] in
+ tee agraph.in.dot | %s -q -s%.0f | tee agraph.out.dot" dot_prg ppi ]
+ else [ dot_prg ; "-q" ; Printf.sprintf "-s%.0f" ppi ] in
let error fmt =
Printf.kprintf (fun s -> done_cb (`LAYOUT_ERROR s)) fmt in
try
|