~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: 2007-01-17 17:21:14 UTC
  • mfrom: (2229.2.5 reserved-ids)
  • Revision ID: pqm@pqm.ubuntu.com-20070117172114-dc75493dad46088c
Ensure reserved ids are never stored

Show diffs side-by-side

added added

removed removed

Lines of Context:
518
518
 
519
519
    def get_delta(self, version_id):
520
520
        """Get a delta for constructing version from some other version."""
 
521
        self.check_not_reserved_id(version_id)
521
522
        if not self.has_version(version_id):
522
523
            raise RevisionNotPresent(version_id, self.filename)
523
524
        
685
686
        ### FIXME escape. RBC 20060228
686
687
        if contains_whitespace(version_id):
687
688
            raise InvalidRevisionId(version_id, self.filename)
 
689
        self.check_not_reserved_id(version_id)
688
690
        if self.has_version(version_id):
689
691
            raise RevisionAlreadyPresent(version_id, self.filename)
690
692
        self._check_lines_not_unicode(lines)
797
799
 
798
800
    def get_line_list(self, version_ids):
799
801
        """Return the texts of listed versions as a list of strings."""
 
802
        for version_id in version_ids:
 
803
            self.check_not_reserved_id(version_id)
800
804
        text_map, content_map = self._get_content_maps(version_ids)
801
805
        return [text_map[v] for v in version_ids]
802
806