MockContentRevision (@Nullable File file, @NotNull String revision, boolean relativePaths) { if (file == null) return null; String path = file.getPath(); if (relativePaths) { path = FileUtil.toSystemIndependentName(path).replace("/before/", "/"); path = FileUtil.toSystemIndependentName(path).replace("/after/", "/"); } return new MockContentRevision(file, VcsUtil.getFilePath(path, false), revision); }