Skip to content
Snippets Groups Projects
Commit a4683ac1 authored by Martin Poirier's avatar Martin Poirier
Browse files

netrender

use an enum property for VCS job type (much more user friendly this way)
parent 463a388e
Branches
No related tags found
No related merge requests found
......@@ -558,11 +558,11 @@ class NetRenderSettings(bpy.types.PropertyGroup):
maxlen = 256,
default = "")
NetRenderSettings.vcs_system = StringProperty(
name="VCS",
description="Version Control System",
maxlen = 64,
default = "Subversion")
NetRenderSettings.vcs_system = EnumProperty(
items= netrender.versioning.ITEMS,
name="VCS mode",
description="Version Control System",
default=netrender.versioning.ITEMS[0][0])
NetRenderSettings.job_id = StringProperty(
name="Network job id",
......
......@@ -46,6 +46,7 @@ class AbstractVCS:
class Subversion(AbstractVCS):
name = "Subversion"
description = "Use the Subversion version control system"
def __init__(self):
super().__init__()
self.version_exp = re.compile("([0-9]*)")
......@@ -87,6 +88,7 @@ class Subversion(AbstractVCS):
class Git(AbstractVCS):
name = "Git"
description = "Use the Git distributed version control system"
def __init__(self):
super().__init__()
self.version_exp = re.compile("^commit (.*)")
......@@ -124,3 +126,9 @@ SYSTEMS = {
Subversion.name: Subversion(),
Git.name: Git()
}
ITEMS = (
(Subversion.name, Subversion.name, Subversion.description),
(Git.name, Git.name, Git.description),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment