@NotNull private static FilePath rebasePath( @NotNull FilePath oldBase, @NotNull FilePath newBase, @NotNull FilePath path) { String relativePath = ObjectUtils.assertNotNull(FileUtil.getRelativePath(oldBase.getPath(), path.getPath(), '/')); return VcsUtil.getFilePath(newBase.getPath() + "/" + relativePath, path.isDirectory()); }
private static SimpleDiffRequest createBinaryDiffRequest( final Project project, final Change change) throws VcsException { final FilePath filePath = ChangesUtil.getFilePath(change); final SimpleDiffRequest request = new SimpleDiffRequest(project, filePath.getPath()); try { request.setContents( createBinaryFileContent(project, change.getBeforeRevision(), filePath.getName()), createBinaryFileContent(project, change.getAfterRevision(), filePath.getName())); return request; } catch (IOException e) { throw new VcsException(e); } }