~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to weave.py

  • Committer: Martin Pool
  • Date: 2005-07-07 07:57:12 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mbp@sourcefrog.net-20050707075712-4784aa908809b905
- preliminary merge conflict detection

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
        # just by just counting as we go along.
314
314
 
315
315
        WFE = WeaveFormatError
316
 
        
 
316
 
317
317
        for l in self._l:
318
318
            if isinstance(l, tuple):
319
319
                isactive = None         # recalculate
341
341
                        if istack[-1] == v:
342
342
                            raise WFE("version %d deletes own text on line %d"
343
343
                                      % (v, lineno))
 
344
                        # XXX
344
345
                        dset.add(v)
345
346
                elif c == ']':
346
347
                    if v in dset:
382
383
        return list(self.get_iter(index))
383
384
 
384
385
 
385
 
    def merge_iter(self, included):
 
386
    def mash_iter(self, included):
386
387
        """Return composed version of multiple included versions."""
387
388
        included = frozenset(included)
388
389
        for origin, lineno, text in self._extract(included):
430
431
 
431
432
 
432
433
 
 
434
    def merge(self, merge_versions):
 
435
        """Automerge and mark conflicts between versions.
 
436
 
 
437
        This returns a sequence, each entry describing alternatives
 
438
        for a chunk of the file.  Each of the alternatives is given as
 
439
        a list of lines.
 
440
 
 
441
        If there is a chunk of the file where there's no diagreement,
 
442
        only one alternative is given.
 
443
        """
 
444
 
 
445
        # approach: find the included versions common to all the
 
446
        # merged versions
 
447
        raise NotImplementedError()
 
448
 
 
449
 
 
450
 
433
451
    def _delta(self, included, lines):
434
452
        """Return changes from basis to new revision.
435
453