|
|
|
@ -426,9 +426,24 @@ class Update(MethodsInterface):
|
|
|
|
|
working_host, url, rpath, revision = self.checkUrl(host, host_urls, repname, dv, git)
|
|
|
|
|
if working_host:
|
|
|
|
|
break
|
|
|
|
|
if not working_host:
|
|
|
|
|
# --------------DEPRECATED--------------#
|
|
|
|
|
if not all([working_host, rpath, revision, url]):
|
|
|
|
|
dv.Write('cl_update_rep_hosting', ' ')
|
|
|
|
|
raise UpdateError(_("Git is unavailable"))
|
|
|
|
|
if not dv.Get("cl_update_rep_url"):
|
|
|
|
|
raise UpdateError(_("Git is unavailable"))
|
|
|
|
|
url, rpath, revision = (
|
|
|
|
|
dv.Select(["cl_update_rep_url", "cl_update_rep_path",
|
|
|
|
|
"cl_update_rep_rev"],
|
|
|
|
|
where="cl_update_rep_name", eq=repname, limit=1))
|
|
|
|
|
|
|
|
|
|
if not url or not rpath:
|
|
|
|
|
raise UpdateError(_("Configuration variables for repositories "
|
|
|
|
|
"are not setup"))
|
|
|
|
|
git = self.getGit()
|
|
|
|
|
if not git.checkUrl(url):
|
|
|
|
|
raise UpdateError(_("Git %s is unavailable") % url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if working_host:
|
|
|
|
|
dv.Write('cl_update_rep_hosting', working_host)
|
|
|
|
|
|
|
|
|
|