code: def _binary_replace(old, new):
      '''
      This function does NOT do any diffing, it just checks the old and new files
      to see if either is binary, and provides an appropriate string noting the
      difference between the two files. If neither file is binary, an empty
      string is returned.
  
      This function should only be run AFTER it has been determined that the
      files differ.
      '''
      old_isbin = not __utils__['files.is_text'](old)
      new_isbin = not __utils__['files.is_text'](new)
      if any((old_isbin, new_isbin)):
          if all((old_isbin, new_isbin)):
              return 'Replace binary file'
          elif old_isbin:
              return 'Replace binary file with text file'
          elif new_isbin:
              return 'Replace text file with binary file'
      return 'f _binary_replace(old, new):
      '''
      This function does NOT do any diffing, it just checks the old and new files
      to see if either is binary, and provides an appropriate string noting the
      difference between the two files. If neither file is binary, an empty
      string is returned.
  
      This function should only be run AFTER it has been determined that the
      files differ.
      '''
      old_isbin = not __utils__['files.is_text'](old)
      new_isbin = not __utils__['files.is_text'](new)
      if any((old_isbin, new_isbin)):
          if all((old_isbin, new_isbin)):
              return 'Replace binary file'
          elif old_isbin:
              return 'Replace binary file with text file'
          elif new_isbin:
              return 'Replace text file with binary file'
      return ''
docs: This function does NOT do any diffing, it just checks the old and new files
      to see if either is binary, and provides an appropriate string noting the
      difference between the two files. If neither file is binary, an empty
      string is returned.
  
      This function should only be run AFTER it has been determined that the
      files differ.