~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to knit.py

  • Committer: Martin Pool
  • Date: 2005-06-27 03:07:11 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050627030711-fa99095a152cd172
Add trivial annotate text

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        return idx
58
58
 
59
59
    
 
60
    def annotate(self, index):
 
61
        return list(self.annotate_iter(index))
 
62
 
 
63
 
 
64
    def annotate_iter(self, index):
 
65
        """Yield list of (index-id, line) pairs for the specified version.
 
66
 
 
67
        The index indicates when the line originated in the weave."""
 
68
        for origin, line in self._l:
 
69
            if origin == index:
 
70
                yield origin, line
 
71
 
 
72
 
60
73
    def getiter(self, index):
61
74
        """Yield lines for the specified version."""
62
75
        self._v[index]                  # check index is valid