~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    # both sequences are empty.
80
80
    if not oldlines and not newlines:
81
81
        return
82
 
    
 
82
 
83
83
    if allow_binary is False:
84
84
        textfile.check_text_lines(oldlines)
85
85
        textfile.check_text_lines(newlines)
200
200
            break
201
201
        else:
202
202
            diffcmd.append('-u')
203
 
                  
 
203
 
204
204
        if diff_opts:
205
205
            diffcmd.extend(diff_opts)
206
206
 
207
207
        pipe = _spawn_external_diff(diffcmd, capture_errors=True)
208
208
        out,err = pipe.communicate()
209
209
        rc = pipe.returncode
210
 
        
 
210
 
211
211
        # internal_diff() adds a trailing newline, add one here for consistency
212
212
        out += '\n'
213
213
        if rc == 2:
248
248
                msg = 'signal %d' % (-rc)
249
249
            else:
250
250
                msg = 'exit code %d' % rc
251
 
                
252
 
            raise errors.BzrError('external diff failed with %s; command: %r' 
 
251
 
 
252
            raise errors.BzrError('external diff failed with %s; command: %r'
253
253
                                  % (rc, diffcmd))
254
254
 
255
255