/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: Marien Zwart
  • Date: 2006-08-24 17:47:09 UTC
  • mto: (1959.1.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1960.
  • Revision ID: marienz@gentoo.org-20060824174709-83cf7a51d41c69f8
Make external diff in binary mode work with recent versions of diffutils.

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
            # 'diff' gives retcode == 2 for all sorts of errors
167
167
            # one of those is 'Binary files differ'.
168
168
            # Bad options could also be the problem.
169
 
            # 'Binary files' is not a real error, so we suppress that error
170
 
            m = re.match('^binary files.*differ$', first_line, re.I)
 
169
            # 'Binary files' is not a real error, so we suppress that error.
 
170
            # Starting with diffutils 2.8.4 the word "binary" was dropped.
 
171
            m = re.match('^(binary )?files.*differ$', first_line, re.I)
171
172
            if not m:
172
173
                raise BzrError('external diff failed with exit code 2;'
173
174
                               ' command: %r' % (diffcmd,))