mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg]: implement 'Compare with the same repository version' for uncommitted renamed file
This commit is contained in:
@@ -15,17 +15,18 @@ package org.zmlx.hg4idea.provider;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.ObjectsConvertor;
|
||||
import com.intellij.openapi.vcs.changes.ChangeListManager;
|
||||
import com.intellij.openapi.vcs.changes.ContentRevision;
|
||||
import com.intellij.openapi.vcs.diff.DiffProvider;
|
||||
import com.intellij.openapi.vcs.diff.ItemLatestState;
|
||||
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.vcsUtil.VcsUtil;
|
||||
import org.zmlx.hg4idea.HgContentRevision;
|
||||
import org.zmlx.hg4idea.HgFile;
|
||||
import org.zmlx.hg4idea.HgRevisionNumber;
|
||||
import org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand;
|
||||
import org.zmlx.hg4idea.util.HgUtil;
|
||||
|
||||
public class HgDiffProvider implements DiffProvider {
|
||||
|
||||
@@ -95,7 +96,7 @@ public class HgDiffProvider implements DiffProvider {
|
||||
if (hgRevisionNumber.isWorkingVersion()) {
|
||||
throw new IllegalStateException("Should not compare against working copy");
|
||||
}
|
||||
HgFile hgFile = new HgFile(vcsRoot, VfsUtilCore.virtualToIoFile(file));
|
||||
HgFile hgFile = new HgFile(vcsRoot, HgUtil.getOriginalFileName(VcsUtil.getFilePath(file), ChangeListManager.getInstance(project)));
|
||||
return HgContentRevision.create(project, hgFile, hgRevisionNumber);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user