/[Apache-SVN]
ViewVC logotype

Revision 1912743


Jump to revision: Previous Next
Author: dsahlberg
Date: Thu Oct 5 07:36:08 2023 UTC (8 months, 1 week ago)
Changed paths: 2
Log Message:
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.

Discussion dev@ https://lists.apache.org/thread/hfnfq4v6jytod1xr4dsttp00ptfgmfgr


Changed paths

Path Details
Directorysubversion/trunk/subversion/bindings/swig/python/svn/fs.py modified , text changed
Directorysubversion/trunk/subversion/bindings/swig/python/tests/fs.py modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26