Browse Source

Переход на константы-ветки

tags/3.4.0_alpha3
Mike Khiretskiy 6 years ago
parent
commit
ee4f335ba9
4 changed files with 14 additions and 9 deletions
  1. +1
    -1
      pym/update/profile.py
  2. +1
    -1
      pym/update/update.py
  3. +11
    -6
      pym/update/variables/update.py
  4. +1
    -1
      pym/update/wsdl_update.py

+ 1
- 1
pym/update/profile.py View File

@@ -25,7 +25,7 @@ from update import UpdateError
from calculate.lib.cl_lang import setLocalTranslate, _
setLocalTranslate('cl_update3', sys.modules[__name__])

DEFAULT_BRANCH = "master"
DEFAULT_BRANCH = Git.Reference.Master


class RepositoryStorage(object):


+ 1
- 1
pym/update/update.py View File

@@ -1135,7 +1135,7 @@ class Update(object):

def message_binhost_changed(self):
if self.refresh_binhost:
self.printWARNING(_("Binhost was changed to %s") %
self.printWARNING(_("Update server was changed to %s") %
self.clVars.Get('cl_update_binhost'))
return True



+ 11
- 6
pym/update/variables/update.py View File

@@ -23,6 +23,7 @@ from calculate.lib.datavars import (Variable, VariableError,
SimpleDataVars, DataVarsError)
from calculate.lib.utils.files import readFile, \
listDirectory, process, pathJoin
from calculate.lib.utils.git import Git

from calculate.lib.configparser import ConfigParser
from calculate.lib.cl_lang import setLocalTranslate
@@ -206,7 +207,7 @@ class VariableClUpdateRepRev(Variable):
for repname, branchname in zip(
self.Get('cl_update_rep_name'),
self.Get('cl_update_branch_name')):
if branchname == "binhost":
if branchname == Git.Reference.Tag:
yield cp.get("vcs", repname, fallback=branch)
else:
yield branchname
@@ -217,7 +218,7 @@ class VariableClUpdateBranch(Variable):
"""
Ветка на которую будет обновляться репозиторий если -getbinpkg
"""
value = "master"
value = Git.Reference.Master

class VariableClUpdateBranchData(TableVariable):
"""
@@ -337,8 +338,8 @@ class VariableClUpdateBinhostRecheckSet(Variable):
opt = ["--recheck-binhost"]

def init(self):
self.help = _("re-check binary hosts")
self.label = _("Re-check binary hosts")
self.help = _("re-check most relevant update server")
self.label = _("Re-check most relevant update server")


class VariableClUpdateBinhostHost(FieldValue, ReadonlyVariable):
@@ -376,11 +377,15 @@ class VariableClUpdateBranchName(Variable):
self.label = _("Branches")

def choice(self):
return ["master", "develop", "update", "binhost"]
return [
Git.Reference.Tag,
Git.Reference.Master,
Git.Reference.Develop,
Git.Reference.Update]

def get(self):
if "getbinpkg" in self.Get('cl_features'):
return ["binhost" for x in self.Get('cl_update_rep_name')]
return [Git.Reference.Tag for x in self.Get('cl_update_rep_name')]
else:
branch = self.Get('cl_update_branch')
return [branch for x in self.Get('cl_update_rep_name')]


+ 1
- 1
pym/update/wsdl_update.py View File

@@ -93,7 +93,7 @@ class Wsdl(WsdlBase):
# заголовок метода
'title': __("Change the Profile"),
# иконка для графической консоли
'image': 'dialog-information',
'image': 'notification-display-brightness-full,gtk-dialog-info',
# метод присутствует в графической консоли
'gui': True,
# консольная команда


Loading…
Cancel
Save