~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to weave.py

  • Committer: Martin Pool
  • Date: 2005-06-28 06:58:34 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050628065834-e84e97c4c0114dae
Add test for extracting from weave with nested insertions

Fix nested insertion processing

Check that stack is emptied at end of weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                    oldc, oldv = stack.pop()
204
204
                    assert oldc == '{'
205
205
                    assert oldv == v
206
 
                    isactive == stack and (stack[-1][1] in included)
 
206
                    isactive = stack and (stack[-1][1] in included)
207
207
                else:
208
208
                    raise ValueError("invalid processing instruction %r" % (l,))
209
209
            else:
213
213
                    yield origin, lineno, l
214
214
            lineno += 1
215
215
 
 
216
        if stack:
 
217
            raise ValueError("unclosed blocks at end of weave",
 
218
                             stack)
 
219
 
216
220
 
217
221
    def getiter(self, index):
218
222
        """Yield lines for the specified version."""