From ee4f335ba97f7fa66f917f63370948d4a8da9770 Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Thu, 3 Sep 2015 17:42:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82?= =?UTF-8?q?=D1=8B-=D0=B2=D0=B5=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/profile.py | 2 +- pym/update/update.py | 2 +- pym/update/variables/update.py | 17 +++++++++++------ pym/update/wsdl_update.py | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pym/update/profile.py b/pym/update/profile.py index 43d7ba2..c0b3192 100644 --- a/pym/update/profile.py +++ b/pym/update/profile.py @@ -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): diff --git a/pym/update/update.py b/pym/update/update.py index 74c120c..7389ddc 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -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 diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 2e4a828..ff7b2a2 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -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')] diff --git a/pym/update/wsdl_update.py b/pym/update/wsdl_update.py index 244d0ff..b28d634 100644 --- a/pym/update/wsdl_update.py +++ b/pym/update/wsdl_update.py @@ -93,7 +93,7 @@ class Wsdl(WsdlBase): # заголовок метода 'title': __("Change the Profile"), # иконка для графической консоли - 'image': 'dialog-information', + 'image': 'notification-display-brightness-full,gtk-dialog-info', # метод присутствует в графической консоли 'gui': True, # консольная команда