~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/deprecated_graph.py

  • Committer: Robert Collins
  • Date: 2007-07-19 06:34:09 UTC
  • mto: (2592.3.46 repository)
  • mto: This revision was merged to the branch mainline in revision 2651.
  • Revision ID: robertc@robertcollins.net-20070719063409-stu9sckrxp8wp3mo
LIBRARY API BREAKS:

  * KnitIndex.get_parents now returns tuples. (Robert Collins)

INTERNALS:

  * Unused functions on the private interface KnitIndex have been removed.
    (Robert Collins)

  * New ``knit.KnitGraphIndex`` which provides a ``KnitIndex`` layered on top
    of a ``index.GraphIndex``. (Robert Collins)

  * New ``knit.KnitVersionedFile.iter_parents`` method that allows querying
    the parents of many knit nodes at once, reducing round trips to the 
    underlying index. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
 
126
126
    def add_node(self, node_id, parent_ids):
127
127
        """Add node_id to the graph with parent_ids as its parents."""
128
 
        if parent_ids == []:
 
128
        if len(parent_ids) == 0:
129
129
            self.roots.add(node_id)
130
130
        self._graph_ancestors[node_id] = list(parent_ids)
131
131
        self._ensure_descendant(node_id)