~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Ian Clatworthy
  • Date: 2009-09-09 00:49:50 UTC
  • mto: (4634.37.2 prepare-2.0)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: ian.clatworthy@canonical.com-20090909004950-43z4zdicb5u91iet
tweak quick reference naming to make it consistent with other PDFs

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import (
20
20
    debug,
21
21
    errors,
22
 
    osutils,
23
22
    revision,
24
23
    trace,
25
24
    )
1679
1678
    return result
1680
1679
 
1681
1680
 
1682
 
class GraphThunkIdsToKeys(object):
1683
 
    """Forwards calls about 'ids' to be about keys internally."""
1684
 
 
1685
 
    def __init__(self, graph):
1686
 
        self._graph = graph
1687
 
 
1688
 
    def heads(self, ids):
1689
 
        """See Graph.heads()"""
1690
 
        as_keys = [(i,) for i in ids]
1691
 
        head_keys = self._graph.heads(as_keys)
1692
 
        return set([h[0] for h in head_keys])
1693
 
 
1694
 
 
1695
1681
_counters = [0,0,0,0,0,0,0]
1696
1682
try:
1697
1683
    from bzrlib._known_graph_pyx import KnownGraph
1698
 
except ImportError, e:
1699
 
    osutils.failed_to_load_extension(e)
 
1684
except ImportError:
1700
1685
    from bzrlib._known_graph_py import KnownGraph