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
Submodule status: Throttle instead of drop frequent updates #8119
Submodule status: Throttle instead of drop frequent updates #8119
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8119 +/- ##
==========================================
+ Coverage 49.53% 49.80% +0.26%
==========================================
Files 852 845 -7
Lines 61296 61459 +163
Branches 11016 11066 +50
==========================================
+ Hits 30364 30607 +243
+ Misses 28669 28545 -124
- Partials 2263 2307 +44
|
e29a74a
to
5e7df72
Compare
Squashed and rebased https://github.com/RussKie/gitextensions/tree/fix_8077 on master, rebased this on that commit and fixed the commented out tests, added a few lines more The bug in the application is not too severe. The status for submodules if not the top project was checked out was incorrect. So the problem requires at least three levels of submodules. The drop down looked like this: With the correction, it looks like the following (sidepanel is correct) |
e98acd1
to
5e7df72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, needs another rebase when #8049 is merged.
5e7df72
to
a8d832f
Compare
The current implementation can be further simplified, no need to separate topmodule and submodule structure update I will adjust some details |
I submitted this to support #8049 in a safe way, but it has maybe grown too big for 3.4 |
9827c27
to
07e4023
Compare
Testcases added, also checking AllSubmodules/OurSubmodules (what failed in the old testcases) Edit: ChangedFiles does not report the expected number of changes in Appveyor, cannot see why now... |
Without having looked at the code, it might help to add |
96e9314
to
38fd912
Compare
Split tests and added a few more. Six tests fails on AppVeyor though. It is consistent behavior though, no evident race condition. @mstv any more hints to why the tests fail? |
I have not found a regarding failed AppVeyor run.
OK for me. |
Printf debugging still is not the worst idea. |
38fd912
to
d1a35ea
Compare
Eventually fixed the problem, same problem as #7861: AppVeyor does not set an email address which causes commit to fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
A few changes backported from gitextensions#8119 * If not top project is current and current module has changed commits, git-status with no dirty will not clear the current ahead/behind * If not top project is current and git-status is initially not dirty for super projects but there are changed commits in superior projects, the status is now set as dirty * If a submodule is no longer dirty, the status was no longer cleared when initiated from git-Status * Some attempts to not refresh status twice
One more corner case, with another test case |
A few changes backported from gitextensions#8119 * If not top project is current and current module has changed commits, git-status with no dirty will not clear the current ahead/behind * If not top project is current and git-status is initially not dirty for super projects but there are changed commits in superior projects, the status is now set as dirty * If a submodule is no longer dirty, the status was no longer cleared when initiated from git-Status * Some attempts to not refresh status twice
c326c8b
to
8267e9a
Compare
8267e9a
to
67b328d
Compare
@msftbot merge in 24 hours |
Hello @gerhardol! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
I believe this is ready, but did not plan to include it in 3.4
Submitting now for discussion of #8049
Proposed changes
SubmoduleStatusProvider will not update the status more often than every 15th second to limit load.
This was added before the status update was fully async and before updates were pruned (latest change in #8116).
The status should not be noticable (at least comparable to git-status, that can take a long time in big repos with many submodules).
The update limitation remains with this PR, but instead of dropping frequent updates, the handling is throttled to update no more often than every 15th second.
The handling has also been simplified.
A change to specific mention is that previously, if not the top module was selected, the complete structure including the current submodule was updated. The current submodule was then updated a second time. (There was a comment that the update not triggered by git-status would skip this, but that was incorrect.)
This will maybe be noticeable on a deep tree where a module below submodule is updated. (but very minor effect)
Test methodology
Tests exists, a test is disabled for the same reason as before.
Can maybe be improved.
✒️ I contribute this code under The Developer Certificate of Origin.