use of com.intellij.execution.process.ProcessOutput in project intellij-community by JetBrains.
the class SvnExecutableChecker method validateLocale.
@Nullable
private Notification validateLocale() throws SvnBindException {
ProcessOutput versionOutput = getVersionClient().runCommand(false);
Notification result = null;
Matcher matcher = INVALID_LOCALE_WARNING_PATTERN.matcher(versionOutput.getStderr());
if (matcher.find()) {
LOG.info(matcher.group());
result = new ExecutableNotValidNotification(prepareDescription(UIUtil.getHtmlBody(matcher.group()), false), NotificationType.WARNING);
} else if (!isEnglishOutput(versionOutput.getStdout())) {
LOG.info("\"svn --version\" command contains non-English output " + versionOutput.getStdout());
result = new ExecutableNotValidNotification(prepareDescription(SvnBundle.message("non.english.locale.detected.warning"), false), NotificationType.WARNING);
}
return result;
}
use of com.intellij.execution.process.ProcessOutput in project intellij-community by JetBrains.
the class HgTestRepository method create.
/**
* Creates a new Mercurial repository in a new temporary test directory.
* @param test reference to the test case instance.
* @return created repository.
*/
public static HgTestRepository create(HgTest test) throws Exception {
final TempDirTestFixture dirFixture = createFixtureDir();
final File repo = new File(dirFixture.getTempDirPath());
final ProcessOutput processOutput = test.runHg(repo, "init");
AbstractVcsTestCase.verify(processOutput);
return new HgTestRepository(test, dirFixture);
}
use of com.intellij.execution.process.ProcessOutput in project intellij-community by JetBrains.
the class SvnRenameTest method testCommitAfterRenameDir.
// IDEADEV-19065
@Test
public void testCommitAfterRenameDir() throws Exception {
final VirtualFile child = prepareDirectoriesForRename();
renameFileInCommand(child, "newchild");
checkin();
final ProcessOutput runResult = runSvn("log", "-q", "newchild/a.txt");
verify(runResult);
final List<String> lines = StringUtil.split(runResult.getStdout(), "\n");
for (Iterator<String> iterator = lines.iterator(); iterator.hasNext(); ) {
final String next = iterator.next();
if (next.startsWith(LOG_SEPARATOR_START)) {
iterator.remove();
}
}
Assert.assertEquals(2, lines.size());
Assert.assertTrue(lines.get(0).startsWith("r2 |"));
Assert.assertTrue(lines.get(1).startsWith("r1 |"));
}
use of com.intellij.execution.process.ProcessOutput in project intellij-community by JetBrains.
the class SvnRenameTest method testRenameReplace.
// IDEADEV-18844
@Test
public void testRenameReplace() throws Exception {
enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD);
final VirtualFile a = createFileInCommand("a.txt", "old");
final VirtualFile aNew = createFileInCommand("aNew.txt", "new");
checkin();
renameFileInCommand(a, "aOld.txt");
renameFileInCommand(aNew, "a.txt");
final ProcessOutput result = runSvn("status");
verifySorted(result, "A + aOld.txt", "D aNew.txt", "R + a.txt");
}
use of com.intellij.execution.process.ProcessOutput in project intellij-community by JetBrains.
the class SvnRenameTest method testRenamePackageWithChildren.
// IDEADEV-15876
@Test
public void testRenamePackageWithChildren() throws Exception {
final VirtualFile child = prepareDirectoriesForRename();
renameFileInCommand(child, "childnew");
final ProcessOutput result = runSvn("status");
verifySorted(result, "A + childnew", "D child", "D child" + File.separatorChar + "a.txt", "D child" + File.separatorChar + "grandChild", "D child" + File.separatorChar + "grandChild" + File.separatorChar + "b.txt");
// wait for end of refresh operations initiated from SvnFileSystemListener
refreshVfs();
final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
changeListManager.ensureUpToDate(false);
List<Change> changes = new ArrayList<>(changeListManager.getDefaultChangeList().getChanges());
Assert.assertEquals(4, changes.size());
sortChanges(changes);
verifyChange(changes.get(0), "child", "childnew");
verifyChange(changes.get(1), "child" + File.separatorChar + "a.txt", "childnew" + File.separatorChar + "a.txt");
verifyChange(changes.get(2), "child" + File.separatorChar + "grandChild", "childnew" + File.separatorChar + "grandChild");
verifyChange(changes.get(3), "child" + File.separatorChar + "grandChild" + File.separatorChar + "b.txt", "childnew" + File.separatorChar + "grandChild" + File.separatorChar + "b.txt");
VirtualFile oldChild = myWorkingCopyDir.findChild("child");
Assert.assertEquals(FileStatus.DELETED, changeListManager.getStatus(oldChild));
}
Aggregations