HgCommandResult (@NotNull VirtualFile repoRoot, @NotNull FilePath sourcePath, @NotNull FilePath targetPath) { // hg wlock error may occur while execute this command // since hg version 2017 config timeout.warn=time_in_seconds can be added as argument to wait before warn File repoFile = VfsUtilCore.virtualToIoFile(repoRoot); return new HgCommandExecutor(project).executeInCurrentThread(repoRoot, "rename", asList("--after", getRelativePath(repoFile, sourcePath.getIOFile()), getRelativePath(repoFile, targetPath.getIOFile()))); }