/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to branchview/linegraph.py

  • Committer: Jelmer Vernooij
  • Date: 2008-04-25 19:54:56 UTC
  • mfrom: (450.8.1 trunk)
  • Revision ID: jelmer@samba.org-20080425195456-odfm2gf6g6qbfhyj
Merge fix for regression in linegraph.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
__copyright__ = "Copyright © 2005 Canonical Ltd."
10
10
__author__    = "Scott James Remnant <scott@ubuntu.com>"
11
11
 
 
12
from bzrlib.revision import NULL_REVISION
12
13
from bzrlib.tsort import merge_sort
13
14
 
14
15
def linegraph(repository, start_revs, maxnum, broken_line_length = None,
46
47
    graph_parents = {}
47
48
    graph_children = {}
48
49
    for (revid, parent_revids) in graph.iter_ancestry(start_revs):
49
 
        graph_parents[revid] = parent_revids
 
50
        if parent_revids == (NULL_REVISION,):
 
51
            graph_parents[revid] = ()
 
52
        else:
 
53
            graph_parents[revid] = parent_revids
50
54
        graph_children[revid] = []
51
55
 
52
56
    graph_parents["top:"] = start_revs