Rev 512: Pass graph object rather than full repository to linegraph. in file:///data/jelmer/bzr-gtk/trunk/

Jelmer Vernooij jelmer at samba.org
Sun Jun 29 16:47:32 BST 2008


At file:///data/jelmer/bzr-gtk/trunk/

------------------------------------------------------------
revno: 512
revision-id: jelmer at samba.org-20080629154730-xfsotoxwkiytf0ph
parent: jelmer at samba.org-20080628154539-l5lkvs5qwuf2zx1m
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2008-06-29 17:47:30 +0200
message:
  Pass graph object rather than full repository to linegraph.
modified:
  branchview/linegraph.py        graph.py-20051016214152-ebf565808c860cf7
  branchview/treeview.py         treeview.py-20071020204704-vk1erblrjhbcgw94-1
=== modified file 'branchview/linegraph.py'
--- a/branchview/linegraph.py	2008-05-04 18:16:01 +0000
+++ b/branchview/linegraph.py	2008-06-29 15:47:30 +0000
@@ -12,7 +12,7 @@
 from bzrlib.revision import NULL_REVISION
 from bzrlib.tsort import merge_sort
 
-def linegraph(repository, start_revs, maxnum, broken_line_length = None,
+def linegraph(graph, start_revs, maxnum, broken_line_length = None,
               graph_data = True, mainline_only = False):
     """Produce a directed graph of a bzr repository.
 
@@ -43,7 +43,6 @@
     curved, kinked, etc.) and to pick the actual colours for each index.
     """
     
-    graph = repository.get_graph()
     graph_parents = {}
     ghosts = set()
     graph_children = {}

=== modified file 'branchview/treeview.py'
--- a/branchview/treeview.py	2008-06-28 15:45:39 +0000
+++ b/branchview/treeview.py	2008-06-29 15:47:30 +0000
@@ -285,7 +285,7 @@
         show_graph = self.graph_column.get_visible()
 
         self.branch.lock_read()
-        (linegraphdata, index, columns_len) = linegraph(self.branch.repository,
+        (linegraphdata, index, columns_len) = linegraph(self.branch.repository.get_graph(),
                                                         (self.start,) , # Sequence of start revisions
                                                         self.maxnum, 
                                                         broken_line_length,




More information about the bazaar-commits mailing list