Skip to content

Conversation

@Mikaz-fr
Copy link
Contributor

As discussed in #2702, svn status can take quite some time. This change aims to optionally perform svn status check asynchronously, like it's provided for git status.

In the setting file I've move prompt_includeVersionControl up as it makes sense to decide on that before deciding if sync or async update should be used. I've added a new setting for svn status update.
In clink.lua this new setting is used to decide if the status should be checked asynchronously or blocking. Similar caching mechanism than git is used too.

I've done limited testing with the different svn repo I have and it seems to behave. Please propose improvement if needed.

Mikaz-fr added 2 commits May 25, 2022 15:28
Add new setting value prompt_overrideSvnStatusOptIn to cmder_prompt_config.lua.default to control of asynchronous svn status update should be used with clink
If enabled in the cmder prompt config, use clink asynchronous update of the prompt for svn status (similar to git)
Copy link
Contributor

@chrisant996 chrisant996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one prompt coroutine per prompt filter.

One coroutine is shared by git and svn (and hg etc), because they are both handled inside a single prompt filter. So if both git and svn call clink_promptcoroutine then whichever happens first specifies the function that will actually run. So, if a directory is part of both git and svn (unlikely, but possible) then the prompt will malfunction.

That's an unlikely scenario for git vs svn, maybe, but in the future other prompt segments may want to run async as well, and they may need to coexist with git and/or svn.

So, the clink_promptcoroutine stuff needs to be rearranged a bit. I can do that tonight.

EDIT: Apparently there are separate prompt filters for git / svn / hg, so what I pointed out above doesn't apply here.

(I already updated clink-flex-prompt.)

@chrisant996
Copy link
Contributor

The change looks good to me!

@daxgames daxgames merged commit 913f93d into cmderdev:master Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants