Merge "Distinguish between error and timeout in intraline diff error message"

This commit is contained in:
Shawn Pearce
2013-04-22 17:48:34 +00:00
committed by Gerrit Code Review
6 changed files with 26 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ public interface PatchConstants extends Constants {
String patchHistoryTitle();
String disabledOnLargeFiles();
String intralineFailure();
String intralineTimeout();
String illegalNumberOfColumns();
String upToChange();

View File

@@ -18,6 +18,7 @@ patchHistoryTitle = Patch History
patchSet = Patch Set
disabledOnLargeFiles = Disabled on very large source files.
intralineFailure = Intraline difference not available due to server error.
intralineTimeout = Intraline difference not available due to timeout.
illegalNumberOfColumns = The number of columns cannot be zero or negative
upToChange = Up to change

View File

@@ -125,6 +125,7 @@ public abstract class PatchScreen extends Screen implements
private HandlerRegistration regNavigation;
private HandlerRegistration regAction;
private boolean intralineFailure;
private boolean intralineTimeout;
/**
* How this patch should be displayed in the patch screen.
@@ -493,6 +494,7 @@ public abstract class PatchScreen extends Screen implements
}
intralineFailure = isFirst && script.hasIntralineFailure();
intralineTimeout = isFirst && script.hasIntralineTimeout();
}
@Override
@@ -501,6 +503,9 @@ public abstract class PatchScreen extends Screen implements
if (intralineFailure) {
intralineFailure = false;
new ErrorDialog(PatchUtil.C.intralineFailure()).show();
} else if (intralineTimeout) {
intralineTimeout = false;
new ErrorDialog(PatchUtil.C.intralineTimeout()).show();
}
if (topView != null && prefs.get().isRetainHeader()) {
setTopView(topView);