首页 > 代码库 > Python SVN 更新 脚本
Python SVN 更新 脚本
#configsPROJECTS = {"away3d":"svn://svnurl/away3d","Away3DUCtrl":"svn://svnurl/Away3DUCtrl","Editor":"svn://svnurl/Editor","EditorUI":"svn://svnurl/EditorUI","SkillEditor":"svn://svnurl/SkillEditor","ParticleEditor":"svn://svnurl/ParticleEditor","clayuiV3":"svn://svnurl/clayuiV3","RFProjectV3":"svn://svnurl/RFProjectV3","RFGameV3":"svn://svnurl/RFGameV3",}SVN_USER = "user"SVN_PWD = "pss"import osWORKSPACE = os.getcwd()print("WORKSPACE:\"%s\"" % WORKSPACE) def svnUpdate(targetDir): #url, SVN_USER, SVN_PWD, targetDir cmd = "svn up \"%s\" --non-interactive" os.system(cmd% targetDir)def svnCheckout(url, targetDir): #url, SVN_USER, SVN_PWD, targetDir cmd = "svn checkout %s --username %s --password %s --non-interactive %s" os.system(cmd% (url, SVN_USER, SVN_PWD, targetDir)) def updateAll(): for key in PROJECTS: url = PROJECTS[key] dir = WORKSPACE+"\\"+key if os.path.exists(dir) == False: print("Checkout SVN \"%s\" \n from \"%s\""% (key, url)) svnCheckout(url, dir) else: print("Update SVN \"%s\" \n from \"%s\""% (key, url)) svnUpdate(dir)updateAll()
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。