SVN: UX improvements #136
@ -425,7 +425,13 @@ class SVN_repository(PropertyGroup):
|
||||
|
||||
def update_active_file(self, context):
|
||||
"""When user clicks on a different file, the latest log entry of that file
|
||||
should become the active log entry."""
|
||||
should become the active log entry.
|
||||
NOTE: Try to only trigger this on explicit user actions!
|
||||
"""
|
||||
|
||||
if self.external_files_active_index == self.prev_external_files_active_index:
|
||||
return
|
||||
self.prev_external_files_active_index = self.external_files_active_index
|
||||
|
||||
latest_rev = self.get_latest_revision_of_file(
|
||||
self.active_file.svn_path)
|
||||
@ -451,6 +457,11 @@ class SVN_repository(PropertyGroup):
|
||||
for log_entry in self.log]
|
||||
)
|
||||
|
||||
prev_external_files_active_index: IntProperty(
|
||||
name="Previous Active Index",
|
||||
description="Internal value to avoid triggering the update callback unnecessarily",
|
||||
options=set()
|
||||
)
|
||||
external_files_active_index: IntProperty(
|
||||
name="File List",
|
||||
description="Files tracked by SVN",
|
||||
@ -521,10 +532,6 @@ class SVN_repository(PropertyGroup):
|
||||
|
||||
if len(self.external_files) == 0:
|
||||
return
|
||||
if self.active_file.show_in_filelist:
|
||||
# Trigger the update callback, because that refreshes the SVN Log UI.
|
||||
self.external_files_active_index = self.external_files_active_index
|
||||
return
|
||||
|
||||
# Make sure the active file isn't now being filtered out.
|
||||
# If it is, change the active file to the first visible one.
|
||||
|
@ -228,21 +228,6 @@ def update_file_list(context, file_statuses: Dict[str, Tuple[str, str, int]]):
|
||||
if not file_entry.exists:
|
||||
new_files_on_repo.add((file_entry.svn_path, repos_status))
|
||||
|
||||
# if file_entry.status_prediction_type == 'SKIP_ONCE':
|
||||
# # File status was predicted by a local svn file operation,
|
||||
# # so we should ignore this status update and reset the flag.
|
||||
# # The file status will be updated on the next status update.
|
||||
# # This is because this status update was initiated before the file's
|
||||
# # status was predicted, so the prediction is likely to be correct,
|
||||
# # and the status we have here is likely to be outdated.
|
||||
# file_entry.status_prediction_type = 'SKIPPED_ONCE'
|
||||
# continue
|
||||
# elif file_entry.status_prediction_type not in {'NONE', 'SKIPPED_ONCE'}:
|
||||
# # We wait for `svn up/commit` background processes to finish and
|
||||
# # set the predicted flag to SKIP_ONCE. Until then, we ignore status
|
||||
# # updates on files that are being updated or committed.
|
||||
# continue
|
||||
|
||||
if entry_existed and (file_entry.repos_status == 'none' and repos_status != 'none'):
|
||||
new_files_on_repo.add((file_entry.svn_path, repos_status))
|
||||
|
||||
|
@ -195,10 +195,7 @@ def execute_tooltip_log(self, context):
|
||||
repo = context.scene.svn.get_repo(context)
|
||||
tup = repo.get_log_by_revision(self.log_rev)
|
||||
if tup:
|
||||
if context.area.type == 'FILE_BROWSER':
|
||||
repo.log_active_index_filebrowser = tup[0]
|
||||
else:
|
||||
repo.log_active_index = tup[0]
|
||||
repo.log_active_index = tup[0]
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user