~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-19 18:33:40 UTC
  • mfrom: (5972.3.25 get-ancestry-is-evil)
  • Revision ID: pqm@pqm.ubuntu.com-20110619183340-ds1rpql77nxrmo4n
(jelmer) Deprecate Repository.get_ancestry(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
        result.get_parent_map([('A',)])
182
182
        return result
183
183
 
184
 
    def fileid_involved_between_revs(self, from_revid, to_revid):
185
 
        """Find file_id(s) which are involved in the changes between revisions.
186
 
 
187
 
        This determines the set of revisions which are involved, and then
188
 
        finds all file ids affected by those revisions.
189
 
        """
190
 
        vf = self._get_revision_vf()
191
 
        from_set = set(vf.get_ancestry(from_revid))
192
 
        to_set = set(vf.get_ancestry(to_revid))
193
 
        changed = to_set.difference(from_set)
194
 
        return self._fileid_involved_by_set(changed)
195
 
 
196
 
    def fileid_involved(self, last_revid=None):
197
 
        """Find all file_ids modified in the ancestry of last_revid.
198
 
 
199
 
        :param last_revid: If None, last_revision() will be used.
200
 
        """
201
 
        if not last_revid:
202
 
            changed = set(self.all_revision_ids())
203
 
        else:
204
 
            changed = set(self.get_ancestry(last_revid))
205
 
        if None in changed:
206
 
            changed.remove(None)
207
 
        return self._fileid_involved_by_set(changed)
208
 
 
209
184
    @needs_read_lock
210
185
    def get_revision(self, revision_id):
211
186
        """Return the Revision object for a named revision"""