Hg executable chenged in test mode: the same executable using for idea production hg execution and command line hg executor.

*Vcs global settings  for HG_Executable updated
*Annotations added
This commit is contained in:
Nadya.Zabrodina
2013-04-12 15:27:29 +04:00
parent 63df5974cc
commit b3e50cc26d
2 changed files with 9 additions and 1 deletions
@@ -19,6 +19,7 @@ import com.intellij.dvcs.test.Executor;
import com.intellij.openapi.application.PluginPathManager;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.Arrays;
@@ -31,7 +32,7 @@ public class HgExecutor extends Executor {
private static final String HG_EXECUTABLE_ENV = "IDEA_TEST_HG_EXECUTABLE";
private static final String HG_EXECUTABLE = doFindExecutable();
@NotNull private static final String HG_EXECUTABLE = doFindExecutable();
private static String doFindExecutable() {
final String programName = "hg";
@@ -70,4 +71,8 @@ public class HgExecutor extends Executor {
return run(split);
}
@NotNull
public static String getHgExecutable() {
return HG_EXECUTABLE;
}
}
@@ -79,6 +79,9 @@ public abstract class HgPlatformTest extends UsefulTestCase {
hg("version");
createRepository(myProjectRoot);
HgVcs hgVcs = HgVcs.getInstance(myProject);
assertNotNull(hgVcs);
hgVcs.getGlobalSettings().setHgExecutable(HgExecutor.getHgExecutable());
myRepository = myProjectRoot;
setUpHgrc(myRepository);