diff options
author | Luke Kanies <luke@madstop.com> | 2008-02-13 14:26:28 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-02-13 14:26:28 -0600 |
commit | d406353d3435ed6c8f4949fb35a15411a7a14d80 (patch) | |
tree | 7a350721c358d1b6fb97c954a14b36fa8c7bc0e0 /lib | |
parent | 068b61e022c42fb12a5c657cb9d1ebbd98c7ca38 (diff) | |
download | puppet-d406353d3435ed6c8f4949fb35a15411a7a14d80.tar.gz puppet-d406353d3435ed6c8f4949fb35a15411a7a14d80.tar.xz puppet-d406353d3435ed6c8f4949fb35a15411a7a14d80.zip |
Removing the last vestiges of GRATR from the PGraph class
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/pgraph.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/puppet/pgraph.rb b/lib/puppet/pgraph.rb index 71547802e..3bcc2ced0 100644 --- a/lib/puppet/pgraph.rb +++ b/lib/puppet/pgraph.rb @@ -19,23 +19,6 @@ class Puppet::PGraph < Puppet::SimpleGraph super end - # Make sure whichever edge has a label keeps the label - def copy_label(source, target, label) - # 'require' relationships will not have a label, - # and all 'subscribe' relationships have the same - # label, at least for now. - - # Labels default to {}, so we can't just test for nil. - newlabel = label || {} - oldlabel = edge_label(source, target) || {} - if ! newlabel.empty? and oldlabel.empty? - edge_label_set(source, target, label) - # We should probably check to see if the labels both exist - # and don't match, but we'd just throw an error which the user - # couldn't do anyting about. - end - end - # Which resources a given resource depends upon. def dependents(resource) tree_from_vertex(resource).keys @@ -115,23 +98,11 @@ class Puppet::PGraph < Puppet::SimpleGraph t = edge.target end - # We don't want to add multiple copies of the - # same edge, but we *do* want to make sure we - # keep labels around. - # XXX This will *not* work when we support multiple - # types of labels, and only works now because - # you can only do simple subscriptions. - if edge?(s, t) - copy_label(s, t, edge.label) - next - end add_edge(s, t, edge.label) end # Now get rid of the edge, so remove_vertex! works correctly. remove_edge!(edge) - Puppet.debug "%s: %s => %s: %s" % [container, - edge.source, edge.target, edge?(edge.source, edge.target)] end end remove_vertex!(container) |