@Test public void keep_all() { SimpleVersion v1 = new SimpleVersion.Builder() .changeset(mapOf("key", "value1")) .build(); SimpleVersion v2 = new SimpleVersion.Builder() .parents(v1.revision) .changeset(mapOf("key1", "value1")) .build(); SimpleVersion v3 = new SimpleVersion.Builder() .parents(v2.revision) .changeset(mapOf("key2", "value1")) .build(); SimpleVersionGraph graph = SimpleVersionGraph.init(v1, v2, v3); OptimizedGraph<String, String, String, SimpleVersionGraph> optimizedGraph = graph.optimize(v1.revision, v2.revision, v3.revision); assertThat(optimizedGraph.getGraph()).isSameAs(graph); }
public G getGraph() { return graph; }
OptimizedGraph { public G getGraph() { return graph; } }
OptimizedGraph { public G getGraph() { return graph; } OptimizedGraph(G graph, List<Revision> keptRevisions, List<Revision> squashedRevisions); }
OptimizedGraph { public G getGraph() { return graph; } OptimizedGraph(G graph, List<Revision> keptRevisions, List<Revision> squashedRevisions); G getGraph(); List<Revision> getSquashedRevisions(); List<Revision> getKeptRevisions(); }
OptimizedGraph { public G getGraph() { return graph; } OptimizedGraph(G graph, List<Revision> keptRevisions, List<Revision> squashedRevisions); G getGraph(); List<Revision> getSquashedRevisions(); List<Revision> getKeptRevisions();  }