Author: hartmannathan Date: Wed Oct 4 04:55:59 2023 New Revision: 1912724 URL: http://svn.apache.org/viewvc?rev=1912724&view=rev Log: * subversion/bindings/swig/python/svn/fs.py (FileDiff.get_pipe): Add docstring, pointing out the possible failure mode of no external 'diff' found on PATH, unlikely on Unix but quite possible on Windows.
Mail thread "Close SVN-1778" begun 1 Oct 2023, archived: https://lists.apache.org/thread/hfnfq4v6jytod1xr4dsttp00ptfgmfgr Issue: SVN-1778 (partial) Review by: dsahlberg Modified: subversion/trunk/subversion/bindings/swig/python/svn/fs.py Modified: subversion/trunk/subversion/bindings/swig/python/svn/fs.py URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/python/svn/fs.py?rev=1912724&r1=1912723&r2=1912724&view=diff ============================================================================== --- subversion/trunk/subversion/bindings/swig/python/svn/fs.py (original) +++ subversion/trunk/subversion/bindings/swig/python/svn/fs.py Wed Oct 4 04:55:59 2023 @@ -158,6 +158,18 @@ class FileDiff: return self.tempfile1, self.tempfile2 def get_pipe(self): + """Perform diff and return a file object from which the output can + be read. + + When DIFFOPTIONS is None (the default), use svn's internal diff. + + With any other DIFFOPTIONS, exec the external diff found on PATH, + passing it DIFFOPTIONS. On Windows, exec diff.exe rather than + diff. If a diff utility is not installed or found on PATH, throws + FileNotFoundError. Caveat: On some systems, including Windows, an + external diff may not be available unless installed and added to + PATH manually. + """ self.get_files() # If diffoptions were provided, then the diff command needs to be
