From a299fba15d3fd49b5955e1453a03d54695971771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Santos?= Date: Thu, 23 Jan 2020 11:47:37 +0000 Subject: [PATCH] connect deps to outs --- dvc/command/pipeline.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dvc/command/pipeline.py b/dvc/command/pipeline.py index ed806bc4a..36d53c36e 100644 --- a/dvc/command/pipeline.py +++ b/dvc/command/pipeline.py @@ -52,15 +52,16 @@ class CmdPipelineShow(CmdBase): nodes.append(stage.relpath) edges = [] - for from_stage, to_stage in networkx.dfs_edges(G, target_stage): + for from_stage, to_stage in G.edges(): if commands: if to_stage.cmd is None: continue edges.append((from_stage.cmd, to_stage.cmd)) elif outs: - for from_out in from_stage.outs: + for from_dep in from_stage.deps: for to_out in to_stage.outs: - edges.append((str(from_out), str(to_out))) + if from_dep.path_info == to_out.path_info: + edges.append((str(from_dep), str(to_out))) else: edges.append((from_stage.relpath, to_stage.relpath))