Blender SVN: New Features #273

Open
Demeter Dzadik wants to merge 13 commits from New-SVN-features into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 15 additions and 1 deletions
Showing only changes of commit 776604b366 - Show all commits

View File

@ -26,6 +26,12 @@ class SVN_addon_preferences(AddonPreferences):
default=False default=False
) )
do_auto_updates: BoolProperty(
name="Auto-Update",
description="Automatically download updates as they appear on the remote",
default=False
)
repositories: CollectionProperty(type=SVN_repository) repositories: CollectionProperty(type=SVN_repository)
def init_repo_list(self): def init_repo_list(self):
@ -110,6 +116,9 @@ class SVN_addon_preferences(AddonPreferences):
def is_busy(self): def is_busy(self):
return Processes.is_running('Commit', 'Update') return Processes.is_running('Commit', 'Update')
### Keeping a backup of repository data in blender_svn.txt. ###
### This is important so it doesn't get lost on add=on disable. ###
loading: BoolProperty( loading: BoolProperty(
name="Loading", name="Loading",
description="Disable the credential update callbacks while loading repo data to avoid infinite loops", description="Disable the credential update callbacks while loading repo data to avoid infinite loops",

View File

@ -165,6 +165,9 @@ class BGP_SVN_Status(BackgroundProcess):
update_file_list_svn_list(context, self.list_command_output) update_file_list_svn_list(context, self.list_command_output)
repo.refresh_ui_lists(context) repo.refresh_ui_lists(context)
self.timestamp_last_update = time.time() self.timestamp_last_update = time.time()
if prefs.do_auto_updates:
if any([f.repos_status != 'normal' for f in repo.external_files]):
print("Automatic updates would start now.")
def get_ui_message(self, context): def get_ui_message(self, context):
time_since_last_update = time.time() - self.timestamp_last_update time_since_last_update = time.time() - self.timestamp_last_update

View File

@ -223,7 +223,9 @@ def draw_file_list(context, layout):
col.separator() col.separator()
col.operator("svn.commit", icon='EXPORT', text="") col.operator("svn.commit", icon='EXPORT', text="")
col.operator("svn.update_all", icon='IMPORT', text="").revision = 0 col.prop(prefs, 'do_auto_updates', icon='TEMP', text="")
if not prefs.do_auto_updates:
col.operator("svn.update_all", icon='IMPORT', text="").revision = 0
col.separator() col.separator()
col.operator("svn.cleanup", icon='BRUSH_DATA', text="") col.operator("svn.cleanup", icon='BRUSH_DATA', text="")