IDEA-68760 Mercurial: synchronize files after revert
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Thu, 28 Apr 2011 14:24:31 +0000 (18:24 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Thu, 28 Apr 2011 16:06:52 +0000 (20:06 +0400)
Execute hg revert in current thread.
vfs refresh is not needed - it is performed in the common RollbackWorker.

plugins/hg4idea/src/org/zmlx/hg4idea/command/HgRevertCommand.java
plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgRollbackEnvironment.java

index 8a11f380d769969d2b66cd32ec6a2a79246964b0..36eb15973143f20306519c8d39bb66f868573a2e 100644 (file)
@@ -52,7 +52,7 @@ public class HgRevertCommand {
       List<String> args = new LinkedList<String>();
       args.addAll(options);
       args.addAll(chunk);
-      new HgCommandExecutor(project).execute(repo, "revert", args, null);
+      new HgCommandExecutor(project).executeInCurrentThread(repo, "revert", args);
     }
     project.getMessageBus().syncPublisher(HgVcs.BRANCH_TOPIC).update(project);
   }
index 6e24b9ed0ef90d0e9644e80af98dad871392847a..4d26dcc3741ac334fa95cf4c4106a081c0746a26 100644 (file)
@@ -14,13 +14,11 @@ package org.zmlx.hg4idea.provider;
 
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vcs.FilePath;
-import com.intellij.openapi.vcs.ObjectsConvertor;
 import com.intellij.openapi.vcs.VcsException;
 import com.intellij.openapi.vcs.changes.Change;
 import com.intellij.openapi.vcs.changes.ContentRevision;
 import com.intellij.openapi.vcs.rollback.RollbackEnvironment;
 import com.intellij.openapi.vcs.rollback.RollbackProgressListener;
-import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.NotNull;
 import org.zmlx.hg4idea.HgRevisionNumber;
@@ -96,7 +94,6 @@ public class HgRollbackEnvironment implements RollbackEnvironment {
       new HgRevertCommand(project).execute(repo, files, revisionNumber, false);
       new HgResolveCommand(project).markResolved(repo, files);
     }
-    LocalFileSystem.getInstance().refreshIoFiles(ObjectsConvertor.fp2jiof(filePaths), true, true, null);
   }
 
 }