mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] Improve notification if exception happens during collecting of unmerged files
This commit is contained in:
@@ -208,7 +208,9 @@ public class GitConflictResolver {
|
||||
}
|
||||
}
|
||||
} catch (VcsException e) {
|
||||
notifyException(mergeDialogInvokedFromNotification, e);
|
||||
if (((GitVcs)myPlatformFacade.getVcs(myProject)).getExecutableValidator().checkExecutableAndNotifyIfNeeded()) {
|
||||
notifyException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -224,12 +226,10 @@ public class GitConflictResolver {
|
||||
});
|
||||
}
|
||||
|
||||
private void notifyException(boolean mergeDialogInvokedFromNotification, VcsException e) {
|
||||
private void notifyException(VcsException e) {
|
||||
LOG.info("mergeFiles ", e);
|
||||
final String description = mergeDialogInvokedFromNotification
|
||||
? "Be sure to resolve all conflicts before update. <br/>"
|
||||
: "Be sure to resolve all conflicts first. ";
|
||||
GitVcs.IMPORTANT_ERROR_NOTIFICATION.createNotification("Not all conflicts resolved",
|
||||
final String description = "Couldn't check the working tree for unmerged files because of an error.";
|
||||
GitVcs.IMPORTANT_ERROR_NOTIFICATION.createNotification(myParams.myErrorNotificationTitle,
|
||||
description + myParams.myErrorNotificationAdditionalDescription + "<br/>" +
|
||||
e.getLocalizedMessage(),
|
||||
NotificationType.ERROR,
|
||||
|
||||
@@ -370,7 +370,7 @@ public class GitUpdateProcess {
|
||||
private boolean areUnmergedFiles() {
|
||||
LOG.info("areUnmergedFiles: checking if there are unmerged files...");
|
||||
GitConflictResolver.Params params = new GitConflictResolver.Params();
|
||||
params.setErrorNotificationTitle("Can't update");
|
||||
params.setErrorNotificationTitle("Update was not started");
|
||||
params.setMergeDescription("Unmerged files detected. These conflicts must be resolved before update.");
|
||||
return !new GitMergeCommittingConflictResolver(myProject, myGit, myMerger, GitUtil.getRootsFromRepositories(myRepositories),
|
||||
params, false).merge();
|
||||
|
||||
Reference in New Issue
Block a user