SVN: UX improvements #136
@ -267,7 +267,7 @@ class SVN_OT_revert_and_update(SVN_OT_download_file_revision, SVN_OT_revert_file
|
|||||||
"""Convenience operator for the "This file is outdated" warning message. Normally, these two operations should be done separately!"""
|
"""Convenience operator for the "This file is outdated" warning message. Normally, these two operations should be done separately!"""
|
||||||
bl_idname = "svn.revert_and_update_file"
|
bl_idname = "svn.revert_and_update_file"
|
||||||
bl_label = "Revert And Update File"
|
bl_label = "Revert And Update File"
|
||||||
bl_description = "The currently opened .blend file has a newer version available on the remote repository. Click to PERMANENTLY DISCARD local changes to this file and update it to the latest revision. Cannot be undone"
|
bl_description = "A different version of this file was downloaded while it was open. This warning will persist until the file is updated and reloaded, or committed. Click to PERMANENTLY DISCARD local changes to this file and update it to the latest revision. Cannot be undone"
|
||||||
bl_options = {'INTERNAL'}
|
bl_options = {'INTERNAL'}
|
||||||
|
|
||||||
missing_file_allowed = False
|
missing_file_allowed = False
|
||||||
|
@ -155,7 +155,6 @@ class SVN_OT_commit(SVN_Operator, Popup_Operator, Operator):
|
|||||||
def execute(self, context: Context) -> Set[str]:
|
def execute(self, context: Context) -> Set[str]:
|
||||||
committable_files = self.get_committable_files(context)
|
committable_files = self.get_committable_files(context)
|
||||||
files_to_commit = [f for f in committable_files if f.include_in_commit]
|
files_to_commit = [f for f in committable_files if f.include_in_commit]
|
||||||
prefs = get_addon_prefs(context)
|
|
||||||
repo = context.scene.svn.get_repo(context)
|
repo = context.scene.svn.get_repo(context)
|
||||||
|
|
||||||
if not files_to_commit:
|
if not files_to_commit:
|
||||||
|
@ -51,6 +51,8 @@ class BGP_SVN_Commit(BackgroundProcess):
|
|||||||
print(self.output)
|
print(self.output)
|
||||||
repo = context.scene.svn.get_repo(context)
|
repo = context.scene.svn.get_repo(context)
|
||||||
for f in repo.external_files:
|
for f in repo.external_files:
|
||||||
|
if f == repo.current_blend_file:
|
||||||
|
context.scene.file_is_outdated = False
|
||||||
if f.status_prediction_type == 'SVN_COMMIT':
|
if f.status_prediction_type == 'SVN_COMMIT':
|
||||||
f.status_prediction_type = 'SKIP_ONCE'
|
f.status_prediction_type = 'SKIP_ONCE'
|
||||||
Processes.start('Log')
|
Processes.start('Log')
|
||||||
|
@ -25,7 +25,7 @@ def draw_outdated_file_warning(self, context):
|
|||||||
row.operator('svn.resolve_conflict',
|
row.operator('svn.resolve_conflict',
|
||||||
text="SVN: This .blend file is conflicted.", icon='ERROR')
|
text="SVN: This .blend file is conflicted.", icon='ERROR')
|
||||||
elif current_file.repos_status != 'none' or context.scene.svn.file_is_outdated:
|
elif current_file.repos_status != 'none' or context.scene.svn.file_is_outdated:
|
||||||
op = row.operator('svn.revert_and_update_file', text="SVN: This .blend file is outdated.", icon='ERROR')
|
op = row.operator('svn.revert_and_update_file', text="SVN: This .blend file may be outdated.", icon='ERROR')
|
||||||
op.file_rel_path = repo.current_blend_file.svn_path
|
op.file_rel_path = repo.current_blend_file.svn_path
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user