Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitStatusMonitor could start multiple commands #9700

Merged

Conversation

gerhardol
Copy link
Member

@gerhardol gerhardol commented Oct 30, 2021

Fixes #9615

See also #9700 for 3.5, with the essential correction (most of the changes was done first to find the problem).

Proposed changes

If If the monitor was inactivated while a status command was running
(minimizing/restoring the app, start a modal dialog) the current command
is canceled to give the latest data.
lock() will ensure that more than one "active" command is not running.
However, one control variable was reset also if the command was canceled
which allowed the canceled command to be followed by another.

Also changed to not request a new status command if a command is already
running. (current status should be good enough, if there are pending
changes they will be requested later).

Some refactoring and cleanups.

Test methodology

Manual testing

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Oct 30, 2021
@gerhardol gerhardol marked this pull request as draft October 30, 2021 18:29
@gerhardol gerhardol force-pushed the feature/i9615-gitstatus-multiple branch from 1fab8da to 79473a0 Compare October 31, 2021 18:15
@gerhardol gerhardol marked this pull request as ready for review October 31, 2021 18:15
If If the monitor was inactivated while a status command was running
(minimizing/restoring the app, start a modal dialog) the current command
is canceled to give the latest data.
lock() will ensure that more than one "active" command is not running.
However, one control variable was reset also if the command was canceled
which allowed the canceled command to be followed by another.

Also changed to not request a new status command if a command is already
 running. (current status should be good enough, if there are pending
 changes they will be requested later).

Some refactoring and cleanups.
@mstv
Copy link
Member

mstv commented Nov 12, 2021

still under test (a first variant of this PR stopped updating after a few days and did not recover)

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

LGTM, worked stable several times over minimum one week without restart

@gerhardol
Copy link
Member Author

Plan to merge this in a couple of days.

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

@gerhardol gerhardol merged commit e2630a6 into gitextensions:master Dec 5, 2021
@ghost ghost added this to the vNext milestone Dec 5, 2021
@gerhardol gerhardol deleted the feature/i9615-gitstatus-multiple branch December 5, 2021 10:30
gerhardol added a commit to gerhardol/gitextensions that referenced this pull request Dec 5, 2021
If the monitor was inactivated while a status command was running
(minimizing/restoring the app, start a modal dialog) the current command
is canceled to give the latest data.
lock() will ensure that more than one "active" command is not running.
However, one control variable was reset also if the command was canceled
which allowed the canceled command to be followed by another.

Also changed to not request a new status command if a command is already
running. (Current status should be good enough, if there are pending
changes they will be requested later.)

Cherry picked essential changes from master:
gitextensions#9700/e2630a6c5b09452b0a0ef7a3ff169083c3fcb7c4
gerhardol added a commit that referenced this pull request Dec 5, 2021
If the monitor was inactivated while a status command was running
(minimizing/restoring the app, start a modal dialog) the current command
is canceled to give the latest data.
lock() will ensure that more than one "active" command is not running.
However, one control variable was reset also if the command was canceled
which allowed the canceled command to be followed by another.

Also changed to not request a new status command if a command is already
running. (Current status should be good enough, if there are pending
changes they will be requested later.)

Cherry picked essential changes from master:
#9700/e2630a6c5b09452b0a0ef7a3ff169083c3fcb7c4
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.

Git Extension : CPU load 100% - Disk space full - GIT.exe process increases
3 participants