Add optional clink async prompt update for svn status#2703
Add optional clink async prompt update for svn status#2703daxgames merged 2 commits intocmderdev:masterfrom
Conversation
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)
There was a problem hiding this comment.
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.)
|
The change looks good to me! |
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_includeVersionControlup 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.luathis 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.