'Return the Dependencies graph for the update.
Returns a Dependencies object representing the dependencies between
update operations to move from an existing stack definition to a new
one.'

def dependencies(self):

    existing_deps = self.existing_stack.dependencies
    new_deps = self.new_stack.dependencies
    def edges():
        for e in new_deps.graph().edges():
            (yield e)
        for e in existing_deps.graph(reverse=True).edges():
            (yield e)
        for (name, res) in six.iteritems(self.existing_stack):
            if (name in self.new_stack):
                (yield (res, self.new_stack[name]))
    return dependencies.Dependencies(edges())
