~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-14 08:21:19 UTC
  • mfrom: (3517.4.20 stacking)
  • Revision ID: pqm@pqm.ubuntu.com-20080714082119-ju6qe5weo8pp7f1c
merge integrated branch stacking

Show diffs side-by-side

added added

removed removed

Lines of Context:
847
847
        # impact 'bzr check' substantially, and needs to be integrated with
848
848
        # care. However, it does check for the obvious problem of a delta with
849
849
        # no basis.
850
 
        keys = self.keys()
 
850
        keys = self._index.keys()
851
851
        parent_map = self.get_parent_map(keys)
852
852
        for key in keys:
853
853
            if self._index.get_method(key) != 'fulltext':
856
856
                    raise errors.KnitCorrupt(self,
857
857
                        "Missing basis parent %s for %s" % (
858
858
                        compression_parent, key))
 
859
        for fallback_vfs in self._fallback_vfs:
 
860
            fallback_vfs.check()
859
861
 
860
862
    def _check_add(self, key, lines, random_id, check_content):
861
863
        """check that version_id and lines are safe to add."""
1058
1060
        return text_map, final_content
1059
1061
 
1060
1062
    def get_parent_map(self, keys):
1061
 
        """Get a map of the parents of keys.
 
1063
        """Get a map of the graph parents of keys.
1062
1064
 
1063
1065
        :param keys: The keys to look up parents for.
1064
1066
        :return: A mapping from keys to parents. Absent keys are absent from
2041
2043
        self.has_graph = parents
2042
2044
        self._is_locked = is_locked
2043
2045
 
 
2046
    def __repr__(self):
 
2047
        return "%s(%r)" % (self.__class__.__name__, self._graph_index)
 
2048
 
2044
2049
    def add_records(self, records, random_id=False):
2045
2050
        """Add multiple records to the index.
2046
2051