/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-26 13:16:59 UTC
  • mfrom: (1959.1.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1960.
  • Revision ID: john@arbash-meinel.com-20060826131659-140bcaf758134ed2
[merge] Marien Zwart: Updates for newer diffutils.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
            # 'diff' gives retcode == 2 for all sorts of errors
193
193
            # one of those is 'Binary files differ'.
194
194
            # Bad options could also be the problem.
195
 
            # 'Binary files' is not a real error, so we suppress that error
 
195
            # 'Binary files' is not a real error, so we suppress that error.
196
196
            lang_c_out = out
197
197
 
198
198
            # Since we got here, we want to make sure to give an i18n error
207
207
                               ' natively: %r' % (diffcmd,))
208
208
 
209
209
            first_line = lang_c_out.split('\n', 1)[0]
210
 
            m = re.match('^binary files.*differ$', first_line, re.I)
 
210
            # Starting with diffutils 2.8.4 the word "binary" was dropped.
 
211
            m = re.match('^(binary )?files.*differ$', first_line, re.I)
211
212
            if m is None:
212
213
                raise BzrError('external diff failed with exit code 2;'
213
214
                               ' command: %r' % (diffcmd,))