/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 20:03:44 UTC
  • mfrom: (463.3.1 bug.215350)
  • Revision ID: jelmer@samba.org-20080425200344-1s2gp5qnoq15fu1o
Merge fix for View Changes menu option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    
46
46
    graph = repository.get_graph()
47
47
    graph_parents = {}
48
 
    ghosts = set()
49
48
    graph_children = {}
50
49
    for (revid, parent_revids) in graph.iter_ancestry(start_revs):
51
 
        if parent_revids is None:
52
 
            ghosts.add(revid)
53
 
            continue
54
50
        if parent_revids == (NULL_REVISION,):
55
51
            graph_parents[revid] = ()
56
52
        else:
57
53
            graph_parents[revid] = parent_revids
58
 
        for parent in parent_revids:
59
 
            graph_children.setdefault(parent, []).append(revid)
60
 
        graph_children.setdefault(revid, [])
61
 
    for ghost in ghosts:
62
 
        for ghost_child in graph_children[ghost]:
63
 
            graph_parents[ghost_child] = [p for p in graph_parents[ghost_child]
64
 
                                          if p not in ghosts]
 
54
        graph_children[revid] = []
 
55
 
65
56
    graph_parents["top:"] = start_revs
66
57
 
67
58
    if len(graph_parents)>0:
103
94
        revid_index[revid] = rev_index
104
95
        
105
96
        parents = graph_parents[revid]
 
97
        for parent_revid in parents:
 
98
            graph_children[parent_revid].append(revid)
 
99
        
106
100
        linegraph.append([revid,
107
101
                          None,
108
102
                          [],