~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-10-08 08:12:00 UTC
  • mfrom: (2858.2.5 remove-checks)
  • Revision ID: pqm@pqm.ubuntu.com-20071008081200-04a0byt5lo5tyft9
Remove old calls to safe_file_id and safe_revision_id (mbp)

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
                 representation of the inserted version which can be provided
118
118
                 back to future add_lines calls in the parent_texts dictionary.
119
119
        """
120
 
        version_id = osutils.safe_revision_id(version_id)
121
 
        parents = [osutils.safe_revision_id(v) for v in parents]
122
120
        self._check_write_ok()
123
121
        return self._add_lines(version_id, parents, lines, parent_texts,
124
122
            left_matching_blocks, nostore_sha, random_id, check_content)
135
133
        
136
134
        This takes the same parameters as add_lines and returns the same.
137
135
        """
138
 
        version_id = osutils.safe_revision_id(version_id)
139
 
        parents = [osutils.safe_revision_id(v) for v in parents]
140
136
        self._check_write_ok()
141
137
        return self._add_lines_with_ghosts(version_id, parents, lines,
142
138
            parent_texts, nostore_sha, random_id, check_content)
191
187
 
192
188
        Must raise RevisionAlreadyPresent if the new version is
193
189
        already present in file history."""
194
 
        new_version_id = osutils.safe_revision_id(new_version_id)
195
 
        old_version_id = osutils.safe_revision_id(old_version_id)
196
 
        parents = [osutils.safe_revision_id(v) for v in parents]
197
190
        self._check_write_ok()
198
191
        return self._clone_text(new_version_id, old_version_id, parents)
199
192
 
358
351
        if version_ids is None:
359
352
            return dict(self.iter_parents(self.versions()))
360
353
        result = {}
361
 
        pending = set(osutils.safe_revision_id(v) for v in version_ids)
 
354
        pending = set(version_ids)
362
355
        while pending:
363
356
            this_iteration = pending
364
357
            pending = set()
660
653
            # None cannot be in source.versions
661
654
            return set(self.source.versions())
662
655
        else:
663
 
            version_ids = [osutils.safe_revision_id(v) for v in version_ids]
664
656
            if ignore_missing:
665
657
                return set(self.source.versions()).intersection(set(version_ids))
666
658
            else: