Fix issue #1778: Better handling if diff is not available.

r1824410 solves the basic issue, to use the internal diff functions
when available. However if diffoptions is not None, an external
diff command is still called. If diff (or diff.exe) is not found
in PATH, Python2 will raise an OSError and Python3 will raise a
FileNotFoundError (which inherits OSError).

r1912724 adds a docstring to FileDiff.get_pipe() documenting this
behaviour.

This revision add an improved error message. When dropping Python2
support, the code can catch FileNotFoundError and remove the check
for ENOENT.

* subversion/bindings/swig/python/svn/fs.py
  (FileDiff.get_pipe): Catch OSError/ENOENT and improve error msg

* subversion/bindings/swig/python/tests/fs.py
  (test_diff_repos_paths_external): Add note to change code when
   droping Python2 support. No functional change.



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1912743 13f79535-47bb-0310-9956-ffa450edef68
2 files changed