From 60f455c7ffa2298b2fdbe7635beef0d2e8d1df65 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 11 Apr 2012 11:17:58 +0200 Subject: [PATCH] minor vcs test tweaks --- .../com/intellij/testFramework/AbstractVcsTestCase.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java b/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java index 833b4dccd418..67d0eed69bbc 100644 --- a/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java @@ -381,15 +381,18 @@ public abstract class AbstractVcsTestCase { } protected VirtualFile copyFileInCommand(final VirtualFile file, final VirtualFile newParent) { - return copyFileInCommand(myProject, file, newParent); + return copyFileInCommand(myProject, file, newParent, file.getName()); } - public static VirtualFile copyFileInCommand(final Project project, final VirtualFile file, final VirtualFile newParent) { + public static VirtualFile copyFileInCommand(final Project project, + final VirtualFile file, + final VirtualFile newParent, + final String newName) { return new WriteCommandAction(project) { @Override protected void run(Result result) throws Throwable { try { - result.setResult(file.copy(this, newParent, file.getName())); + result.setResult(file.copy(this, newParent, newName)); } catch (IOException e) { throw new RuntimeException(e);