~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: Martin Pool
  • Date: 2007-08-15 04:33:34 UTC
  • mto: (2701.1.2 remove-should-cache)
  • mto: This revision was merged to the branch mainline in revision 2710.
  • Revision ID: mbp@sourcefrog.net-20070815043334-01dx9emb0vjiy29v
Remove things deprecated in 0.11 and earlier

Show diffs side-by-side

added added

removed removed

Lines of Context:
1021
1021
        versions = [osutils.safe_revision_id(v) for v in versions]
1022
1022
        return self._index.get_ancestry_with_ghosts(versions)
1023
1023
 
1024
 
    #@deprecated_method(zero_eight)
1025
 
    def walk(self, version_ids):
1026
 
        """See VersionedFile.walk."""
1027
 
        # We take the short path here, and extract all relevant texts
1028
 
        # and put them in a weave and let that do all the work.  Far
1029
 
        # from optimal, but is much simpler.
1030
 
        # FIXME RB 20060228 this really is inefficient!
1031
 
        from bzrlib.weave import Weave
1032
 
 
1033
 
        w = Weave(self.filename)
1034
 
        ancestry = set(self.get_ancestry(version_ids, topo_sorted=False))
1035
 
        sorted_graph = topo_sort(self._index.get_graph())
1036
 
        version_list = [vid for vid in sorted_graph if vid in ancestry]
1037
 
        
1038
 
        for version_id in version_list:
1039
 
            lines = self.get_lines(version_id)
1040
 
            w.add_lines(version_id, self.get_parents(version_id), lines)
1041
 
 
1042
 
        for lineno, insert_id, dset, line in w.walk(version_ids):
1043
 
            yield lineno, insert_id, dset, line
1044
 
 
1045
1024
    def plan_merge(self, ver_a, ver_b):
1046
1025
        """See VersionedFile.plan_merge."""
1047
1026
        ver_a = osutils.safe_revision_id(ver_a)