[Mercurial Tests] Fix hg executable for tests.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 30 Jun 2010 06:55:05 +0000 (10:55 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 30 Jun 2010 06:55:05 +0000 (10:55 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/HgExecutableValidator.java

index ce8e3aeabff0013bd650ad70945da6e4fb81dcd7..a2d81894faf18d19de0a994df929d2cafa322fa4 100644 (file)
@@ -24,16 +24,16 @@ import java.lang.reflect.InvocationTargetException;
 public class HgExecutableValidator {
 
   private static final Logger LOG = Logger.getInstance(HgExecutableValidator.class.getName());
-  private final Project project;
+  private final Project myProject;
   private boolean myValidHgExecutable;
 
   public HgExecutableValidator(Project project) {
-    this.project = project;
+    this.myProject = project;
   }
 
   public boolean check(final HgGlobalSettings globalSettings) {
     final HgVersionCommand command = new HgVersionCommand();
-    if (command.isValid(globalSettings.getHgExecutable())) {
+    if (command.isValid(HgVcs.getInstance(myProject).getHgExecutable())) {
       return true;
     }
 
@@ -48,7 +48,7 @@ public class HgExecutableValidator {
           String previousHgPath = globalSettings.getHgExecutable();
           HgSetExecutableDialog dialog;
           do {
-            dialog = new HgSetExecutableDialog(project);
+            dialog = new HgSetExecutableDialog(myProject);
             dialog.setBadHgPath(previousHgPath);
             dialog.show();
             myValidHgExecutable = dialog.isOK() && command.isValid(dialog.getNewHgPath());