~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to weave.py

  • Committer: Martin Pool
  • Date: 2005-06-28 07:07:29 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050628070729-1deb6bc0f9768946
More assertions on weave extraction

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
                    assert oldv == v
218
218
                    isactive = stack and (stack[-1][1] in included)
219
219
                else:
220
 
                    raise ValueError("invalid processing instruction %r" % (l,))
 
220
                    raise ValueError("invalid processing instruction %r on line %d"
 
221
                                     % (l, lineno))
221
222
            else:
222
223
                assert isinstance(l, basestring)
 
224
                if not stack:
 
225
                    raise ValueError("literal at top level on line %d"
 
226
                                     % lineno)
223
227
                if isactive:
224
228
                    origin = stack[-1][1]
225
229
                    yield origin, lineno, l