mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Refactor error title if mercurial log command failed.
*Add notification title to HgVcsMessages.
This commit is contained in:
@@ -113,6 +113,7 @@ hg4idea.warning.no-default-update-path=Skipped \"{0}\". No default update path.
|
||||
hg4idea.merge.please-commit=Merged heads, please commit repository \"{0}\"
|
||||
hg4idea.error.invalidExecutable=\"{0}\" is not a valid mercurial executable
|
||||
hg4idea.integrate.other.head=Other head: {0}
|
||||
hg4idea.error.log.command.execution=Error during log command execution
|
||||
|
||||
hg4idea.dialog.login.password.required=Login and password required
|
||||
hg4idea.dialog.login.description=Login to {0}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
|
||||
localRevisions = hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true, args);
|
||||
}
|
||||
catch (HgCommandException e) {
|
||||
new HgCommandResultNotifier(project).notifyError(null, "Error during log command execution", e.getMessage());
|
||||
new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage());
|
||||
return result;
|
||||
}
|
||||
Collections.reverse(localRevisions);
|
||||
@@ -331,7 +331,7 @@ public class HgCachingCommitedChangesProvider implements CachingCommittedChanges
|
||||
revisions = hgLogCommand.execute(hgFile, 1, true, args);
|
||||
}
|
||||
catch (HgCommandException e) {
|
||||
new HgCommandResultNotifier(project).notifyError(null, "Error during log command execution", e.getMessage());
|
||||
new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage());
|
||||
return null;
|
||||
}
|
||||
if (revisions == null || revision.isEmpty()) {
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.zmlx.hg4idea.HgCopyHistoryRevisionNumberAction;
|
||||
import org.zmlx.hg4idea.HgFile;
|
||||
import org.zmlx.hg4idea.HgFileRevision;
|
||||
import org.zmlx.hg4idea.HgVcsMessages;
|
||||
import org.zmlx.hg4idea.action.HgCommandResultNotifier;
|
||||
import org.zmlx.hg4idea.command.HgLogCommand;
|
||||
import org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand;
|
||||
@@ -115,7 +116,7 @@ public class HgHistoryProvider implements VcsHistoryProvider {
|
||||
return logCommand.execute(new HgFile(vcsRoot, filePath), limit, false);
|
||||
}
|
||||
catch (HgCommandException e) {
|
||||
new HgCommandResultNotifier(project).notifyError(null, "Mercurial log command error ", e.getMessage());
|
||||
new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.vcsUtil.VcsUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.zmlx.hg4idea.HgFile;
|
||||
import org.zmlx.hg4idea.HgFileRevision;
|
||||
import org.zmlx.hg4idea.HgVcsMessages;
|
||||
import org.zmlx.hg4idea.command.HgAnnotateCommand;
|
||||
import org.zmlx.hg4idea.command.HgLogCommand;
|
||||
import org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand;
|
||||
@@ -57,7 +58,7 @@ public class HgAnnotationProvider implements AnnotationProvider {
|
||||
logResult = (new HgLogCommand(myProject)).execute(hgFile, DEFAULT_LIMIT, false);
|
||||
}
|
||||
catch (HgCommandException e) {
|
||||
throw new VcsException("Can not annotate, log command failed ", e);
|
||||
throw new VcsException("Can not annotate, " + HgVcsMessages.message("hg4idea.error.log.command.execution"), e);
|
||||
}
|
||||
VcsRevisionNumber revisionNumber = revision == null ?
|
||||
new HgWorkingCopyRevisionsCommand(myProject).tip(vcsRoot) :
|
||||
|
||||
Reference in New Issue
Block a user