def web_export(self, reversion=None): svnurl = "svn://47.91.176.204/" + self.siteid svn_user = "******" svn_pass = "******" repo = Svnrepo(self.web_export_dir, svn_user, svn_pass) if reversion: res = repo.svn_update(reversion) else: genxin_code_dir(self.web_export_dir) res = repo.svn_checkout(svnurl, ccdir=self.web_export_dir)
def conf_export(self, reversion=None): if self.env == "huidu": svnurl = "svn://119.9.91.21/huidu_config/" + self.siteid + "_config" else: svnurl = "svn://119.9.91.21/1000_config/" + self.siteid + "_config" svn_user = "******" svn_pass = "******" repo = Svnrepo(self.conf_export_dir, svn_user, svn_pass) if reversion: res = repo.svn_update(reversion) else: genxin_code_dir(self.conf_export_dir) res = repo.svn_checkout(svnurl, ccdir=self.conf_export_dir)
def pub_export(self, reversion=None): if "m" in self.siteid: svnurl = "svn://119.9.91.21/1000m_public" else: svnurl = "svn://119.9.91.21/1000_public" svn_user = "******" svn_pass = "******" print "svn检出目录:%s" % self.pub_export_dir repo = Svnrepo(self.pub_export_dir, svn_user, svn_pass) if reversion: res = repo.svn_update(reversion) else: genxin_code_dir(self.pub_export_dir) res = repo.svn_checkout(svnurl, ccdir=self.pub_export_dir)
def svn_checkout_task(user, password, url, path, *args): current_task.update_state(state="PROGRESS") repo = Svnrepo(path, user, password) repo.svn_checkout(url, path, *args) return "svn_add_conf_200"