发布时间:2019-08-13 07:39:58编辑:auto阅读(3267)
import time,os,sys,svnconfig
dist=svnconfig.setting['dist']
os.chdir(svnconfig.setting['svn'])
def checkout():
svnconfig.setting['dist']=dist+time.strftime('%Y-%m-%d-%H-%M-%S',time.localtime())
cmd='svn export %(url)s %(dist)s --username %(user)s --password %(pwd)s'%svnconfig.setting
print "execute %s"%cmd
#print os.popen(cmd).read()
return os.system(cmd)
while True:
ret=checkout()
if(ret==0):
print 'check out success'
else:
print 'check out fail'
time.sleep(svnconfig.setting['interval'])
setting={
'svn':'C:/Program Files/Subversion/bin/',#svn的程序所在路径
'url':'http://www.xxx.com/svn/project/trunk',#svn地址
'user':'xxx,#用户名
'pwd':'xxx',#密码
'dist':'D:/svn/',#目标地址
'interval':15 #更新时间
}
上一篇: 将博客搬至CSDN —— python
下一篇: Python3 关键字 in 和 is
51545
51107
41644
38398
32886
29861
28580
23532
23468
21814
1964°
2665°
2219°
2152°
2600°
2183°
2910°
4834°
4666°
3313°