/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/deprecated_graph.py

  • Committer: Robert Collins
  • Date: 2008-04-04 00:43:07 UTC
  • mfrom: (3331 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3333.
  • Revision ID: robertc@robertcollins.net-20080404004307-0whomfhm3yal2rvw
Resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
 
from bzrlib.tsort import topo_sort
19
 
 
20
 
 
21
18
def max_distance(node, ancestors, distances, root_descendants):
22
19
    """Calculate the max distance to an ancestor.  
23
20
    Return None if not all possible ancestors have known distances"""
145
142
    def get_ancestry(self, node_id, topo_sorted=True):
146
143
        """Return the inclusive ancestors of node_id in topological order."""
147
144
        # maybe optimise this ?
 
145
        from bzrlib.tsort import topo_sort
148
146
        result = {}
149
147
        pending = set([node_id])
150
148
        while len(pending):