~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2007-12-28 20:26:04 UTC
  • mto: (3144.5.2 specific-file)
  • mto: This revision was merged to the branch mainline in revision 3156.
  • Revision ID: abentley@panoramicfeedback.com-20071228202604-kkolnauo09glnsbh
Get conflict handling working

Show diffs side-by-side

added added

removed removed

Lines of Context:
1227
1227
        for i, j, n in blocks:
1228
1228
            for a_index in range(last_i, i):
1229
1229
                if a_index in new_a:
1230
 
                    yield 'new-a', self.lines_a[a_index]
1231
 
                if a_index in killed_b:
 
1230
                    if a_index in killed_b:
 
1231
                        yield 'conflicted-a', self.lines_a[a_index]
 
1232
                    else:
 
1233
                        yield 'new-a', self.lines_a[a_index]
 
1234
                else:
1232
1235
                    yield 'killed-b', self.lines_a[a_index]
1233
1236
            for b_index in range(last_j, j):
1234
1237
                if b_index in new_b:
1235
 
                    yield 'new-b', self.lines_b[b_index]
1236
 
                if b_index in killed_a:
 
1238
                    if b_index in killed_a:
 
1239
                        yield 'conflicted-b', self.lines_b[a_index]
 
1240
                    else:
 
1241
                        yield 'new-b', self.lines_b[b_index]
 
1242
                else:
1237
1243
                    yield 'killed-a', self.lines_b[b_index]
1238
1244
            # handle common lines
1239
1245
            for a_index in range(i, i+n):