~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

Merge bzr.dev.

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,))