mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-64887 Mercurial: change dialog that appears on deleted-modified conflict - merge case added
This commit is contained in:
@@ -19,6 +19,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.zmlx.hg4idea.HgVcs;
|
||||
import org.zmlx.hg4idea.execution.HgCommandExecutor;
|
||||
import org.zmlx.hg4idea.execution.HgCommandResult;
|
||||
import org.zmlx.hg4idea.execution.HgDeleteModifyPromptHandler;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -55,7 +56,7 @@ public class HgMergeCommand {
|
||||
} else if (!StringUtil.isEmptyOrSpaces(branch)) {
|
||||
arguments.add(branch);
|
||||
}
|
||||
final HgCommandResult result = commandExecutor.executeInCurrentThread(repo, "merge", arguments);
|
||||
final HgCommandResult result = commandExecutor.executeInCurrentThread(repo, "merge", arguments, new HgDeleteModifyPromptHandler());
|
||||
project.getMessageBus().syncPublisher(HgVcs.BRANCH_TOPIC).update(project);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -295,9 +295,9 @@ public final class HgCommandExecutor {
|
||||
choicePresentationArray[i] = choices[i].toString();
|
||||
}
|
||||
index[0] = Messages
|
||||
.showChooseDialog(message, "hg4idea",
|
||||
choicePresentationArray,
|
||||
defaultChoice.toString(), Messages.getQuestionIcon());
|
||||
.showDialog(message, "hg4idea",
|
||||
choicePresentationArray,
|
||||
defaultChoice.getChosenIndex(), Messages.getQuestionIcon());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public class HgDeleteModifyPromptHandler implements HgPromptHandler {
|
||||
"File " + filename + " is deleted remotely, but modified locally. Do you want to keep the modified version or remove the file?";
|
||||
}
|
||||
else {
|
||||
modifiedMessage = "";
|
||||
modifiedMessage = message;
|
||||
}
|
||||
final int[] chosen = new int[]{-1};
|
||||
try {
|
||||
@@ -69,9 +69,9 @@ public class HgDeleteModifyPromptHandler implements HgPromptHandler {
|
||||
choicePresentationArray[i] = choices[i].toString();
|
||||
}
|
||||
chosen[0] = Messages
|
||||
.showChooseDialog(modifiedMessage, "Delete-Modify Conflict",
|
||||
choicePresentationArray,
|
||||
defaultChoice.toString(), Messages.getQuestionIcon());
|
||||
.showDialog(modifiedMessage, "Delete-Modify Conflict",
|
||||
choicePresentationArray, defaultChoice.getChosenIndex(),
|
||||
Messages.getQuestionIcon());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user