SVN以编程方式更新-python

问题描述 投票:0回答:1

我想使用'svn update'以编程方式调用Python

我已经使用下面的代码实现了svn-checkout,它工作正常吗。

cmd = svn_path + ' co ' + repopath + ' ' + directory_path

p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)

stdout, stderr = p.communicate()

对于结帐,使用了co命令,但找不到更新svn存储库的命令。

请帮助找到更新命令。

python svn process tortoisesvn checkout
1个回答
0
投票

这两个帖子帮助我解决了这个问题,

https://www.guyrutenberg.com/2007/10/29/creating-local-svn-repository-home-repository/comment-page-1/

Subprocess changing directory

cmd = svn_path + ' update'
p = subprocess.Popen(cmd,cwd="working direcroty path", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
© www.soinside.com 2019 - 2024. All rights reserved.