Rev 2395: Test GraphDeltas to the end of a graph with multiple tails when the subgraph is partitioned. in file:///home/robertc/source/baz/netsim/

Robert Collins robertc at robertcollins.net
Sun Apr 1 08:36:55 BST 2007


At file:///home/robertc/source/baz/netsim/

------------------------------------------------------------
revno: 2395
revision-id: robertc at robertcollins.net-20070401073652-xhjw2gmfgjsv4tvi
parent: robertc at robertcollins.net-20070401073344-5seq59fommjsi374
committer: Robert Collins <robertc at robertcollins.net>
branch nick: netsim
timestamp: Sun 2007-04-01 17:36:52 +1000
message:
  Test GraphDeltas to the end of a graph with multiple tails when the subgraph is partitioned.
modified:
  bzrlib/tests/test_graph.py     testgraph.py-20050905070950-42e6c958106610fd
=== modified file 'bzrlib/tests/test_graph.py'
--- a/bzrlib/tests/test_graph.py	2007-04-01 07:33:44 +0000
+++ b/bzrlib/tests/test_graph.py	2007-04-01 07:36:52 +0000
@@ -186,3 +186,22 @@
         result = GraphDelta()
         result.heads = set(['C'])
         self.check_delta(result, graph_from, graph_to)
+
+    def testPartitionedEndOfGraph(self):
+        # grabbing a delta from A->B->C->D,E D->F, E->G to D->F and E->G :
+        graph_from = Graph()
+        graph_from.add_node('A', ['B'])
+        graph_from.add_node('B', ['C'])
+        graph_from.add_node('C', ['D', 'E'])
+        graph_from.add_node('D', ['F'])
+        graph_from.add_node('E', ['G'])
+        graph_from.add_node('F', [])
+        graph_from.add_node('G', [])
+        graph_to = Graph()
+        graph_to.add_node('D', ['F'])
+        graph_to.add_node('E', ['G'])
+        graph_to.add_node('F', [])
+        graph_to.add_node('G', [])
+        result = GraphDelta()
+        result.heads = set(['D', 'E'])
+        self.check_delta(result, graph_from, graph_to)



More information about the bazaar-commits mailing list