Hi monotoners,

Quoting debian bug #563634, you may have found revisions nodes
"displaced with respect to the edges connecting them" in monotone-viz
display.

In fact, dot's "-y" option appears to be broken recently.
An alternative is to use "rankdir=BT".
It is more natural and hopefully solves the issue.

Here's a patch for monotone-viz.

Stéphane
#
#
# patch "agraph.ml"
#  from [8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e]
#    to [05aa88921481ac9bfe238daeb4374fbc9993caaa]
#
============================================================
--- agraph.ml   8ae6c9bb70bbf9fd80e4e62d9f162ac581619b9e
+++ agraph.ml   05aa88921481ac9bfe238daeb4374fbc9993caaa
@@ -50,8 +50,9 @@ let dot_format params agraph =
       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 spawn_dot graph status done_cb =
   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
_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to