diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgLogCommand.java b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgLogCommand.java index 639b86eedf0d..89c432e1016d 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgLogCommand.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgLogCommand.java @@ -80,8 +80,7 @@ public class HgLogCommand { /** * @param limit Pass -1 to set no limits on history */ - public final List execute(final HgFile hgFile, int limit, boolean includeFiles, @Nullable List argsForCmd) - throws HgCommandException { + public final List execute(final HgFile hgFile, int limit, boolean includeFiles, @Nullable List argsForCmd) { if ((limit <= 0 && limit != -1) || hgFile == null) { return Collections.emptyList(); } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommittedChangesProvider.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommittedChangesProvider.java index 34c058f071b3..9cff9c5c130b 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommittedChangesProvider.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommittedChangesProvider.java @@ -38,9 +38,7 @@ import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.zmlx.hg4idea.*; -import org.zmlx.hg4idea.action.HgCommandResultNotifier; import org.zmlx.hg4idea.command.HgLogCommand; -import org.zmlx.hg4idea.execution.HgCommandException; import org.zmlx.hg4idea.ui.HgVersionFilterComponent; import org.zmlx.hg4idea.util.HgUtil; @@ -223,13 +221,7 @@ public class HgCachingCommittedChangesProvider implements CachingCommittedChange } } final List localRevisions; - try { - localRevisions = hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true, args); - } - catch (HgCommandException e) { - new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage()); - return result; - } + localRevisions = hgLogCommand.execute(hgFile, maxCount == 0 ? -1 : maxCount, true, args); Collections.reverse(localRevisions); for (HgFileRevision revision : localRevisions) { @@ -342,13 +334,7 @@ public class HgCachingCommittedChangesProvider implements CachingCommittedChange args.add("--rev"); args.add(revision); final List revisions; - try { - revisions = hgLogCommand.execute(hgFile, 1, true, args); - } - catch (HgCommandException e) { - new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage()); - return null; - } + revisions = hgLogCommand.execute(hgFile, 1, true, args); if (ContainerUtil.isEmpty(revisions)) { return null; } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java index f395a06609c3..43562850f178 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java @@ -29,11 +29,8 @@ import org.jetbrains.annotations.Nullable; import org.zmlx.hg4idea.HgFile; import org.zmlx.hg4idea.HgFileRevision; import org.zmlx.hg4idea.HgRevisionNumber; -import org.zmlx.hg4idea.HgVcsMessages; -import org.zmlx.hg4idea.action.HgCommandResultNotifier; import org.zmlx.hg4idea.command.HgLogCommand; import org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand; -import org.zmlx.hg4idea.execution.HgCommandException; import org.zmlx.hg4idea.util.HgUtil; import javax.swing.*; @@ -129,13 +126,7 @@ public class HgHistoryProvider implements VcsHistoryProvider { args.add("--rev"); args.add("reverse(0::" + revNumberAsArg + ")"); // without --follow was 0:tip by default without --rev; // reverse needed because of mercurial default order problem -r revset with and without -f option - try { - return logCommand.execute(new HgFile(vcsRoot, filePath), limit, false, args); - } - catch (HgCommandException e) { - new HgCommandResultNotifier(project).notifyError(null, HgVcsMessages.message("hg4idea.error.log.command.execution"), e.getMessage()); - return Collections.emptyList(); - } + return logCommand.execute(new HgFile(vcsRoot, filePath), limit, false, args); } public boolean supportsHistoryForDirectories() {