Skip to content

Commit

Permalink
NEW: use single bidirectional arrow for two-way deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelee committed Apr 15, 2013
1 parent d071b5d commit 34003bc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions objc_dep.py
Expand Up @@ -163,7 +163,6 @@ def dependencies_in_dot_format(path, exclude, ignore):
l = []
l.append("digraph G {")
l.append("\tnode [shape=box];")
two_ways = Set()

for k, deps in d.iteritems():
if deps:
Expand All @@ -173,10 +172,8 @@ def dependencies_in_dot_format(path, exclude, ignore):
l.append("\t\"%s\" -> {};" % (k))

for k2 in deps:
if (k, k2) in two_ways_set or (k2, k) in two_ways_set:
two_ways.add((k, k2))
else:
l.append("\t\"%s\" -> \"%s\";" % (k, k2))
if not ((k, k2) in two_ways_set or (k2, k) in two_ways_set):
l.append("\t\"%s\" -> \"%s\";" % (k, k2))

l.append("\t")
for (k, v) in pch_set.iteritems():
Expand All @@ -185,9 +182,9 @@ def dependencies_in_dot_format(path, exclude, ignore):
l.append("\t\"%s\" -> \"%s\" [color=red];" % (k, x))

l.append("\t")
l.append("\tedge [color=blue];")
l.append("\tedge [color=blue, dir=both];")

for (k, k2) in two_ways:
for (k, k2) in two_ways_set:
l.append("\t\"%s\" -> \"%s\";" % (k, k2))

if category_list:
Expand Down

0 comments on commit 34003bc

Please sign in to comment.