-
Notifications
You must be signed in to change notification settings - Fork 18
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
Task #1178 problem with Commit Synchronization in Collaborative Environment #1179
Task #1178 problem with Commit Synchronization in Collaborative Environment #1179
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #1179 +/- ##
=================================================
- Coverage 86.90% 86.85% -0.06%
+ Complexity 5147 5144 -3
=================================================
Files 629 629
Lines 25659 25659
Branches 2331 2331
=================================================
- Hits 22298 22285 -13
- Misses 2578 2590 +12
- Partials 783 784 +1 |
If your not yet done with your feature, please add the "Draft:" thing to the title of the PR, so that it is clear that it should not yet be merged... And only add us as reviers once our done ;) Otherwise we don't know when do look at the changes... ;) |
conflict during the commit.
@Override | ||
protected void doCommit(IProject project, String message, IProgressMonitor monitor) throws Exception { | ||
|
||
// Update before committing | ||
updateBeforeCommit(project, monitor); |
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.
I think if you implement it here, it only works for git not SVN... Maybe move the implementation to the AVersionControlCommitHandler?
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.
I agree to that
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.
Thanks for your comments. i moved it in this class.
@@ -43,7 +43,7 @@ protected void doUpdate(IProject project, IProgressMonitor monitor) throws Excep | |||
|
|||
Repository gitRepository = RepositoryMapping.getMapping(project).getRepository(); | |||
|
|||
// Build the dialog in the UI thread | |||
// Build the dialog in the UI threads |
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.
I think the old comment is right, there is just one UI thread :)
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.
Yes, i think too.
@Override | ||
protected void doCommit(IProject project, String message, IProgressMonitor monitor) throws Exception { | ||
|
||
// Update before committing | ||
updateBeforeCommit(project, monitor); |
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.
I agree to that
for more generality.
|
||
// If the commit message contains the phrase "Backend Local Commit Before Pull", extract the actual commit message | ||
if (commitMessage.contains("Backend Local Commit Before Pull")) { | ||
commitMessage = commitMessage.replace("Backend Local Commit Before Pull: ", ""); |
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.
I think you don't need this if-statemenet... If there is nothing like this in the string, nothing gets replaces ;)
But maybe use a string constant for "Back Local...", maybe you can even use the the constant from the implementation...
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.
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.
Instead of changing (replacing "Backend Local Commit Before Pull: ") the string inside the test, I think the cleaner version would be to change the string in the assert function in the test
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.
Okay @dellerDLR. I did now. You can check now.
@@ -27,34 +27,35 @@ | |||
/** |
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.
Maybe you can reset this file as you didn't do any changes to it?
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.
I did it :) .
To resolve this, I suggest reviewing the code behind the "commit project to repository" button, ensuring that it performs an update before each commit.