I have run in to an issue that I havent been able to resolve.
I am trying to run a subversion command through python to process the results. I had this code running my dev system but when I run it on target system I get an exception in the subprocess module.
Why would this code produce different results on my two systems?
command = "svn log --username " + __SVNUSERNAME + " --password " + __SVNPASSWORD + " --no-auth-cache --non-interactive -v -r {2022-09-26}:{2022-09-27} --xml " + __SVNTRUNK
bytes = subprocess.check_output([command], stderr=subprocess.STDOUT,shell=True)
I get the following exception:
File "E:\5_scripts\svn.py", line 89, in __run
bytes = subprocess.check_output([command], stderr=subprocess.STDOUT,shell=True)
File "C:\tools\Python3\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\tools\Python3\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['{command}']' returned non-zero exit status 1.
I tried to run the same subversion command on the command line and it executes as I expect. When I echo %ERRORLEVEL% it returns a status of 0. So Im lost as to what is happening differently on my target system.
I tried investigating the python docs for the checkoutput() function and there appears to be no major updates between 3.6 and 3.9
I tried investigating the Apache subversion release notes and didnt find any changes to the 'log' subcommand
Dev System:
- Linux 3.10
- python 3.6.8
- svn 1.9.9
Target System:
- Windows Server
- python 3.9.6
- svn 1.7.4
__SVNTRUNKpointed to local WC (not remote repo URL), you have different state of WC and target system can log nothing. Output prepared command to stdout for testing, use it by hand (on target)