发布时间:2019-08-13 07:39:58编辑:auto阅读(3353)
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
52033
51891
42126
38972
33471
30422
29057
24084
23998
22347
68°
108°
127°
115°
136°
128°
152°
168°
170°
174°