~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

define behaviour for add_lines with stacked storage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
895
895
        fulltext_size = None
896
896
        for count in xrange(self._max_delta_chain):
897
897
            # XXX: Collapse these two queries:
898
 
            method = self._index.get_method(parent)
 
898
            try:
 
899
                method = self._index.get_method(parent)
 
900
            except RevisionNotPresent:
 
901
                # Some basis is not locally present: always delta
 
902
                return False
899
903
            index, pos, size = self._index.get_position(parent)
900
904
            if method == 'fulltext':
901
905
                fulltext_size = size
1832
1836
        """
1833
1837
        prefix, suffix = self._split_key(key)
1834
1838
        self._load_prefixes([prefix])
1835
 
        return self._kndx_cache[prefix][0][suffix][1]
 
1839
        try:
 
1840
            return self._kndx_cache[prefix][0][suffix][1]
 
1841
        except KeyError:
 
1842
            raise RevisionNotPresent(key, self)
1836
1843
 
1837
1844
    def get_parent_map(self, keys):
1838
1845
        """Get a map of the parents of keys.