SVN: Checkout, Multi-Repo, Optimizations & Clean-up #104

Merged
Demeter Dzadik merged 12 commits from Mets/blender-studio-pipeline:SVN-improvements into main 2023-07-10 16:49:03 +02:00
Member

The SVN add-on finally allows checking out repositories from scratch!

The UI is a bit ugly, because I felt the need to very aggressively warn the user that if they aren't running Blender through a terminal, they will get screwed, because unlike all other SVN operations, it WILL freeze up the UI until it is done.

This is because it feels wrong to let svn checkout casually run in the background while Blender continues running. Not only would this make it impossible to print live feedback to the console due to technical limitations, but it would also make it trivial to accidentally cancel the checkout process by quitting Blender. To be fair, it turns out that SVN deals with a cancelled checkout quite graciously, so if it does happen, it can be resumed easily, but still. Another reason to have it be a blocking process is because when it's done, we would like to make the new checkout the active repository so user can verify that authentication and status updates are working.

Better multi-repository workflow
While having multiple repositories was already supported, it was a bit buggy and had some questionable UX. For starters, the "Current Blend" repo mode wasn't working at all, whoops. Now, when that is used, instead of hiding the repo list, we gray out all entries except that of the current .blend, and make that the active one. When switching from one repo's .blend file to another, we also nudge the active repo index to the relevant repo. It just works!

Fix drawing lag
Due to complex filtering of many elements, the UI would slow down to a crawl when there are a lot of files with a lot of log entries. This has been optimized a bunch, so everything runs silky smooth again.

Reverting whole repo to older versions can now be done in the background
Yeah, this one was still blocking until now.
It now also gives you a warning if you have any local modifications, since if you're trying to revert the entire repo to a past state, you probably don't want to have local modifications. The UI will advise you to revert or commit your changes before reverting the whole repo.

Plus one million error fixed
Particularly when turning the addon off and back on in various states. Not sure why you would be doing that, but now you can.

**The SVN add-on finally allows checking out repositories from scratch!** The UI is a bit ugly, because I felt the need to very aggressively warn the user that if they aren't running Blender through a terminal, they will get screwed, because unlike all other SVN operations, it WILL freeze up the UI until it is done. This is because it feels wrong to let `svn checkout` casually run in the background while Blender continues running. Not only would this make it impossible to print live feedback to the console due to technical limitations, but it would also make it trivial to accidentally cancel the checkout process by quitting Blender. To be fair, it turns out that SVN deals with a cancelled checkout quite graciously, so if it does happen, it can be resumed easily, but still. Another reason to have it be a blocking process is because when it's done, we would like to make the new checkout the active repository so user can verify that authentication and status updates are working. **Better multi-repository workflow** While having multiple repositories was already supported, it was a bit buggy and had some questionable UX. For starters, the "Current Blend" repo mode wasn't working at all, whoops. Now, when that is used, instead of hiding the repo list, we gray out all entries except that of the current .blend, and make that the active one. When switching from one repo's .blend file to another, we also nudge the active repo index to the relevant repo. It just works! **Fix drawing lag** Due to complex filtering of many elements, the UI would slow down to a crawl when there are a lot of files with a lot of log entries. This has been optimized a bunch, so everything runs silky smooth again. **Reverting whole repo to older versions can now be done in the background** Yeah, this one was still blocking until now. It now also gives you a warning if you have any local modifications, since if you're trying to revert the entire repo to a past state, you probably don't want to have local modifications. The UI will advise you to revert or commit your changes before reverting the whole repo. **Plus one million error fixed** Particularly when turning the addon off and back on in various states. Not sure why you would be doing that, but now you can.
Demeter Dzadik added 9 commits 2023-07-08 01:06:40 +02:00
It was taking a crazy amount of time to determine whether the SVN log
should even be drawn, and also determining whether each file should
be filtered or not.

Now instead of doing this at drawing time, we store a flag on each
file, and update that whenever the search filter changes,
and after status updates and operations.

Should be safe...? Maybe?

A similar change for SVN log entries might follow,
but the slow-down from that seems nowhere near as bad.
Same method as previous commit:
Whenever the active file changes, we set flags on each log file,
indicating whether that file is affected.

This doesn't optimize text-based search filtering, only filtering by
the active file.

Either way, both of these types of filtering are already very fast,
so the speed-up is not as dramatic as the previous improvement.

And for that reason, I probably won't bother also optimizing the
text-based filtering.
Jumping between Pets and Gold with the "Current Blend"
active repository mode seems to be working super smoothly now.
This has been a long time coming, and with this, the SVN add-on could
be considered feature-complete.

(Although we still don't have SVN locking, but I would rather implement
that in a completely custom and de-coupled way, another day.)
Demeter Dzadik added 1 commit 2023-07-08 01:18:30 +02:00
Demeter Dzadik added 2 commits 2023-07-08 01:23:08 +02:00
Demeter Dzadik merged commit 0d91c136aa into main 2023-07-10 16:49:03 +02:00
Demeter Dzadik deleted branch SVN-improvements 2023-07-10 16:49:04 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/blender-studio-tools#104
No description provided.