~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge3.py

  • Committer: Martin Pool
  • Date: 2005-07-05 12:52:34 UTC
  • Revision ID: mbp@sourcefrog.net-20050705125234-97a16455db25c23a
- Small performance optimization for merge3

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
                lines_a = self.a[ia:amatch]
215
215
                lines_b = self.b[ib:bmatch]
216
216
 
217
 
                # TODO: check the len just as a shortcut
218
 
                equal_a = (lines_a == lines_base)
219
 
                equal_b = (lines_b == lines_base)
220
 
                same = lines_a == lines_b
 
217
                # we check the len just as a shortcut
 
218
                equal_a = (len_a == len_base
 
219
                           and lines_a == lines_base)
 
220
                equal_b = (len_b == len_base
 
221
                           and lines_b == lines_base)
 
222
                same = (len_a == len_b
 
223
                        and lines_a == lines_b)
221
224
 
222
225
                if same:
223
226
                    yield 'same', ia, amatch