IDEA-93538 SVN "Lock": Fail error message is (almost) invisible

This commit is contained in:
irengrig
2012-10-25 16:51:33 +04:00
parent 076dc9b29d
commit 7c8e45b1b5
2 changed files with 7 additions and 1 deletions
@@ -262,6 +262,7 @@ progress.text2.processing.file=Processing file {0}
progress.title.lock.files=Lock Files
exception.text.locking.file.failed=Failed to lock file: {0}
message.title.lock.failures=Lock Failures
message.text.files.lock.failed={0,choice, 0#Failed to lock file.|1#Failed to lock files.}
message.text.files.locked={0,choice, 0#Failed to lock files.|1#1 file locked|2#{0,number} files locked}
progress.text.unlocking.files=Unlocking files in repository...
progress.title.unlock.files=Unlock Files
@@ -196,11 +196,16 @@ public class SvnUtil {
if (!failedLocks.isEmpty()) {
String[] failedFiles = ArrayUtil.toStringArray(failedLocks);
List<VcsException> exceptions = new ArrayList<VcsException>();
for (String file : failedFiles) {
exceptions.add(new VcsException(SvnBundle.message("exception.text.locking.file.failed", file)));
}
final StringBuilder sb = new StringBuilder(SvnBundle.message("message.text.files.lock.failed", failedFiles.length == 1 ? 0 : 1));
for (VcsException vcsException : exceptions) {
if (sb.length() > 0) sb.append('\n');
sb.append(vcsException.getMessage());
}
AbstractVcsHelper.getInstance(project).showErrors(exceptions, SvnBundle.message("message.title.lock.failures"));
throw new VcsException(sb.toString());
}
StatusBarUtil.setStatusBarInfo(project, SvnBundle.message("message.text.files.locked", count[0]));