~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to knit.py

  • Committer: Martin Pool
  • Date: 2005-06-27 08:33:27 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050627083327-5420aff3d65321fb
Clean up code to insert into weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
                if i1 != i2:
91
91
                    raise NotImplementedError("can't handle replacing weave [%d:%d] yet"
92
92
                                              % (i1, i2))
93
 
 
94
 
                # TODO: handle lines being offset as we insert stuff
95
 
                # a pure insertion
96
 
                to_insert = []
 
93
                
97
94
                for line in newlines:
98
 
                    to_insert.append((idx, line))
99
 
                
100
 
                self._l[(i1+offset):(i1+offset)] = to_insert
101
 
 
102
 
                offset += len(newlines)
 
95
                    self._l.insert(i1 + offset, (idx, line))
 
96
                    offset += 1
103
97
 
104
98
            self._v.append(VerInfo(parents))
105
99
        else: