I’ve the following function to fetch a file from the Subversion repositorio:
def getFileSVN(remoteFile, localFile):
remoteFile = SVN_URL + '/' + remoteFile
command = '{0} export {1} {2}'.format(SVN, remoteFile, localFile)
ret = subprocess.call(command.split())
if ret == 0:
return True
else:
return False
The function is called with:
ret = getFileSVN(branches/branch/somefile, /tmp/tmpdir/somefile)
But it always fails with:
svn: Can't open '/tmp/tmpdir/tempfile.tmp': No such file or directory
I can’t find where my error is.
Does tmpdir exist? I don’t use SVN myself but it could be that it doesn’t create the folder before trying to create the file.