From 4d70bfa6244dbc077facd65effb0562be1dbc68e Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Tue, 23 Jul 2019 18:34:23 +0300 Subject: [PATCH] hg: request file history for uncommitted renamed file in appropriate test * make sure CLM is up to date; GitOrigin-RevId: 7ab4d33144de3a289314faaebfad7efd755a36f8 --- .../testSrc/hg4idea/test/history/HgHistoryTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/hg4idea/testSrc/hg4idea/test/history/HgHistoryTest.java b/plugins/hg4idea/testSrc/hg4idea/test/history/HgHistoryTest.java index ff8901b3b254..d66d2b5cd5fb 100644 --- a/plugins/hg4idea/testSrc/hg4idea/test/history/HgHistoryTest.java +++ b/plugins/hg4idea/testSrc/hg4idea/test/history/HgHistoryTest.java @@ -15,7 +15,6 @@ */ package hg4idea.test.history; -import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; @@ -131,11 +130,13 @@ public class HgHistoryTest extends HgPlatformTest { String beforeName = names[namesSize - 1]; VirtualFile before = VfsUtil.findFileByIoFile(new File(subDir.getPath(), beforeName), true); assert before != null; - FilePath filePath = VcsUtil.getFilePath(VfsUtilCore.virtualToIoFile(before)); final String renamed = "renamed"; hg("mv " + beforeName + " " + renamed); myRepository.refresh(false, true); - List revisions = HgHistoryProvider.getHistory((filePath), myRepository, myProject); + VirtualFile renamedFile = VfsUtil.findFileByIoFile(new File(subDir.getPath(), renamed), true); + assert renamedFile != null; + changeListManager.ensureUpToDate(); + List revisions = HgHistoryProvider.getHistory(VcsUtil.getFilePath(renamedFile), myRepository, myProject); assertEquals(3, revisions.size()); } }