Merge branch 'master' of git.labs.intellij.net:idea/community
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 28 Jul 2010 07:55:29 +0000 (11:55 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 28 Jul 2010 07:55:29 +0000 (11:55 +0400)
1  2 
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java

index 1dde37947535714c8190029d5fe98e375c407488,295cea12e625ed2925c4679f0824d10eab909110..f836b3627bff399cf6f4129f0ca65d139756dfad
@@@ -38,13 -38,13 +38,14 @@@ import com.intellij.openapi.vcs.checkin
  import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl;
  import com.intellij.openapi.vcs.impl.VcsInitObject;
  import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl;
+ import com.intellij.openapi.vfs.LocalFileSystem;
  import com.intellij.openapi.vfs.VfsUtil;
  import com.intellij.openapi.vfs.VirtualFile;
  import com.intellij.ui.EditorNotifications;
  import com.intellij.util.ConcurrencyUtil;
  import com.intellij.util.Consumer;
  import com.intellij.util.EventDispatcher;
 +import com.intellij.util.NullableFunction;
  import com.intellij.util.containers.MultiMap;
  import com.intellij.util.messages.Topic;
  import org.jdom.Element;
@@@ -852,7 -852,7 +853,7 @@@ public class ChangeListManagerImpl exte
  
    private boolean doCommit(final LocalChangeList changeList, final List<Change> changes, final boolean synchronously) {
      return new CommitHelper(myProject, changeList, changes, changeList.getName(),
 -                     changeList.getComment(), new ArrayList<CheckinHandler>(), false, synchronously, null).doCommit();
 +                     changeList.getComment(), new ArrayList<CheckinHandler>(), false, synchronously, NullableFunction.NULL).doCommit();
    }
  
    public void commitChangesSynchronously(LocalChangeList changeList, List<Change> changes) {
      @Nullable
      private VcsKey findVcs(final String path) {
        // does not matter directory or not
-       final AbstractVcs vcs = myVcsManager.getVcsFor(FilePathImpl.create(new File(path), false));
+       final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(path));
+       if (vf == null) return null;
+       final AbstractVcs vcs = myVcsManager.getVcsFor(vf);
        return vcs == null ? null : vcs.getKeyInstanceMethod();
      }
    }