~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/weave.py

  • Committer: Robert Collins
  • Date: 2006-02-22 10:35:05 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060222103505-bddb211d353f2543
Merge in a variation of the versionedfile api from versioned-file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
 
117
117
        Returned as a list of lines."""
118
118
        w = self.get_weave(file_id, transaction)
119
 
        return w.get(w.lookup(rev_id))
 
119
        return w.get(rev_id)
120
120
    
121
121
    def get_weave_prelude_or_empty(self, file_id, transaction):
122
122
        """cheap version that reads the prelude but not the lines
153
153
 
154
154
    def add_text(self, file_id, rev_id, new_lines, parents, transaction):
155
155
        w = self.get_weave_or_empty(file_id, transaction)
156
 
        parent_idxs = map(w.lookup, parents)
157
 
        w.add(rev_id, parent_idxs, new_lines)
 
156
        w.add_lines(rev_id, parents, new_lines)
158
157
        self.put_weave(file_id, w, transaction)
159
158
        
160
159
    def add_identical_text(self, file_id, old_rev_id, new_rev_id, parents,