SVN导出在从Python的子进程调用时不起作用。



>我有以下函数从 Subversion 存储库中获取文件:

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

调用该函数的方式为:

ret = getFileSVN(branches/branch/somefile, /tmp/tmpdir/somefile)

但它总是失败,并显示:

svn: Can't open '/tmp/tmpdir/tempfile.tmp': No such file or directory

我找不到我的错误在哪里。

tmpdir 存在吗?我自己不使用SVN,但可能是它在尝试创建文件之前没有创建文件夹。

最新更新