发布时间:2019-08-13 07:39:58编辑:auto阅读(3234)
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
51283
50733
41332
38144
32609
29511
28364
23232
23198
21525
1597°
2327°
1928°
1868°
2199°
1911°
2600°
4366°
4213°
2991°