|
|
|
@ -35,25 +35,38 @@ class VariableAcUpdateSync(ReadonlyVariable):
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
class VariableClUpdateWorld(Variable):
|
|
|
|
|
def get(self):
|
|
|
|
|
if self.Get('cl_rebuild_world_set') == "on":
|
|
|
|
|
return "rebuild"
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
class VariableClRebuildWorldSet(Variable):
|
|
|
|
|
"""
|
|
|
|
|
List of action update world, rebuild world,
|
|
|
|
|
"""
|
|
|
|
|
type = "choice"
|
|
|
|
|
opt = ["--(action)-world"]
|
|
|
|
|
value = ""
|
|
|
|
|
syntax = "--{choice}-world"
|
|
|
|
|
metavalue = 'ACTION'
|
|
|
|
|
type = "bool"
|
|
|
|
|
opt = ["--rebuild-world"]
|
|
|
|
|
untrusted = True
|
|
|
|
|
value = "off"
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.help = "'update' - " +_("update world file") + \
|
|
|
|
|
",\n'rebuild' - "+ _("rebuild world file")
|
|
|
|
|
self.label = _("World action")
|
|
|
|
|
self.help = _("rebuild world file")
|
|
|
|
|
self.label = _("Rebuild world")
|
|
|
|
|
|
|
|
|
|
def check(self,value):
|
|
|
|
|
if not value:
|
|
|
|
|
raise VariableError(_("Select action with world"))
|
|
|
|
|
class VariableClUpdateRevSet(Variable):
|
|
|
|
|
"""
|
|
|
|
|
List of action update world, rebuild world,
|
|
|
|
|
"""
|
|
|
|
|
type = "bool"
|
|
|
|
|
opt = ["--update-rev"]
|
|
|
|
|
untrusted = True
|
|
|
|
|
value = "off"
|
|
|
|
|
|
|
|
|
|
def choice(self):
|
|
|
|
|
return [("update",_("Update world")),
|
|
|
|
|
("rebuild","Rebuild world")]
|
|
|
|
|
def init(self):
|
|
|
|
|
self.help = _("update revision")
|
|
|
|
|
self.label = _("Update revision")
|
|
|
|
|
|
|
|
|
|
def check(self,value):
|
|
|
|
|
if value != "on" and self.Get('cl_rebuild_world_set') != 'on':
|
|
|
|
|
raise VariableError(_("Select at least one update action"))
|
|
|
|
|