diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-19 12:53:10 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-08-19 12:53:10 -0700 |
commit | 02cf98d65c798d368fcec43ed64a001d513bdd4f (patch) | |
tree | e39e210ab20917b7e5ffdce14a42f5747506eed0 /platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java | |
parent | 2e5965e996aad62ab1338b09d54caaf99ff3dd6a (diff) | |
download | idea-02cf98d65c798d368fcec43ed64a001d513bdd4f.tar.gz |
Snapshot idea/138.1503 from git://git.jetbrains.org/idea/community.git
Change-Id: Ie01af1d8710ec0ff51d90301bda1a18b0b5c0faf
Diffstat (limited to 'platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java')
-rw-r--r-- | platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java index 6ed592f10939..fc51742b5318 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogJoiner.java @@ -30,9 +30,7 @@ import java.util.*; * @author Kirill Likhodedov */ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { - private final static int BOUND_SAVED_LOG = 10000; - public final static String NOT_ENOUGH_FIRST_BLOCK = "Not enough first block"; public final static String ILLEGAL_DATA_RELOAD_ALL = "All data is illegal - request reload all"; /** @@ -100,12 +98,10 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { Commit commit = commits.get(lastIndex); if (searchHashes.size() == 0) return lastIndex; - if (lastIndex > BOUND_SAVED_LOG) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); searchHashes.remove(commit.getId()); } if (searchHashes.size() != 0) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); + throw new VcsLogRefreshNotEnoughDataException(); return lastIndex; } @@ -157,16 +153,13 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { private void markRealRedNode(@NotNull CommitId node) { if (!currentRed.remove(node)) - throw new IllegalStateException(NOT_ENOUGH_FIRST_BLOCK); + throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); // never happened allRedCommit.add(node); } private int getFirstSaveIndex() { for (int lastIndex = 0; lastIndex < savedLog.size(); lastIndex++) { Commit commit = savedLog.get(lastIndex); - if (lastIndex > BOUND_SAVED_LOG) - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); - boolean isGreen = currentGreen.contains(commit.getId()); if (isGreen) { currentRed.remove(commit.getId()); @@ -180,7 +173,7 @@ public class VcsLogJoiner<CommitId, Commit extends GraphCommit<CommitId>> { if (currentRed.isEmpty()) return lastIndex + 1; } - throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); + throw new IllegalStateException(ILLEGAL_DATA_RELOAD_ALL); // see VcsLogJoinerTest#illegalStateExceptionTest } public Set<CommitId> getAllRedCommit() { |