mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[vcs-log] fix vcs log history for selection view data context
Revision should be returned when NOT the local one, not the other way around. #IJPL-197012 Fixed (cherry picked from commit 6bddafc938fa144ae8658c216f86c9d959181af9) IJ-CR-169871 GitOrigin-RevId: bc26f0661724a5b203e4a9ceff64d52eaaabf53e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2320b4cf05
commit
0fdbcc27a5
@@ -15,6 +15,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* This is a synthetic revision representing the current state of the file in the working copy
|
||||
*/
|
||||
public class CurrentRevision implements VcsFileRevision {
|
||||
private static final Logger LOG = Logger.getInstance(CurrentRevision.class);
|
||||
|
||||
|
||||
@@ -465,11 +465,13 @@ public final class VcsSelectionHistoryDialog extends FrameWrapper implements UiD
|
||||
sink.set(CommonDataKeys.PROJECT, myProject);
|
||||
sink.set(VcsDataKeys.VCS_VIRTUAL_FILE, myFile);
|
||||
|
||||
VcsFileRevision localRevision = myBlockLoader.getLocalRevision();
|
||||
VcsFileRevision selectedObject = myList.getSelectedObject();
|
||||
sink.set(VcsDataKeys.VCS_FILE_REVISION, selectedObject instanceof CurrentRevision o ? o : null);
|
||||
if (!localRevision.equals(selectedObject)) {
|
||||
sink.set(VcsDataKeys.VCS_FILE_REVISION, selectedObject);
|
||||
}
|
||||
List<VcsFileRevision> selectedObjects = myList.getSelectedObjects();
|
||||
sink.set(VcsDataKeys.VCS_FILE_REVISIONS, ContainerUtil.filter(
|
||||
selectedObjects, Conditions.notEqualTo(myBlockLoader.getLocalRevision()))
|
||||
sink.set(VcsDataKeys.VCS_FILE_REVISIONS, ContainerUtil.filter(selectedObjects, Conditions.notEqualTo(localRevision))
|
||||
.toArray(new VcsFileRevision[0]));
|
||||
|
||||
sink.set(VcsDataKeys.VCS, myActiveVcs.getKeyInstanceMethod());
|
||||
|
||||
Reference in New Issue
Block a user