~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to weave.py

  • Committer: Martin Pool
  • Date: 2005-06-28 09:27:28 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050628092728-6b8da9d04400bcc2
Add another constraint: revisions should not delete text that they
just inserted

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
    * Lines are enabled if the most recent enclosing insertion is
103
103
      active and none of the enclosing deletions are active.
104
104
 
 
105
    * There is no point having a deletion directly inside its own
 
106
      insertion; you might as well just not write it.  And there
 
107
      should be no way to get an earlier version deleting a later
 
108
      version.
 
109
 
105
110
 
106
111
    _l
107
112
        Text of the weave. 
245
250
                    if v in dset:
246
251
                        raise WeaveFormatError("repeated deletion marker for version %d on line %d"
247
252
                                               % (v, lineno))
248
 
                    else:
 
253
                    if istack:
 
254
                        if istack[-1] == v:
 
255
                            raise WeaveFormatError("version %d deletes own text on line %d"
 
256
                                                   % (v, lineno))
249
257
                        dset.add(v)
250
258
                elif c == ']':
251
259
                    if v in dset: