Search in sources :

Example 1 with VcsRevisionDescription

use of com.intellij.openapi.vcs.history.VcsRevisionDescription in project intellij-community by JetBrains.

the class SvnAnnotationIsClosedTest method assertRevision.

private void assertRevision(VirtualFile vf1, SvnDiffProvider diffProvider, final long number) {
    final VcsRevisionDescription vf1Rev = diffProvider.getCurrentRevisionDescription(vf1);
    Assert.assertEquals(number, ((SvnRevisionNumber) vf1Rev.getRevisionNumber()).getLongRevisionNumber());
}
Also used : VcsRevisionDescription(com.intellij.openapi.vcs.history.VcsRevisionDescription)

Example 2 with VcsRevisionDescription

use of com.intellij.openapi.vcs.history.VcsRevisionDescription in project intellij-community by JetBrains.

the class VcsContentAnnotationImpl method fileRecentlyChanged.

@Nullable
@Override
public VcsRevisionNumber fileRecentlyChanged(VirtualFile vf) {
    final ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
    final AbstractVcs vcs = vcsManager.getVcsFor(vf);
    if (vcs == null)
        return null;
    if (vcs.getDiffProvider() instanceof DiffMixin) {
        final VcsRevisionDescription description = ((DiffMixin) vcs.getDiffProvider()).getCurrentRevisionDescription(vf);
        final Date date = description.getRevisionDate();
        return isRecent(date) ? description.getRevisionNumber() : null;
    }
    return null;
}
Also used : ProjectLevelVcsManager(com.intellij.openapi.vcs.ProjectLevelVcsManager) DiffMixin(com.intellij.openapi.vcs.diff.DiffMixin) AbstractVcs(com.intellij.openapi.vcs.AbstractVcs) VcsRevisionDescription(com.intellij.openapi.vcs.history.VcsRevisionDescription) Date(java.util.Date) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with VcsRevisionDescription

use of com.intellij.openapi.vcs.history.VcsRevisionDescription in project intellij-community by JetBrains.

the class SvnAnnotationIsClosedTest method assertRevision.

private void assertRevision(VirtualFile vf1, SvnDiffProvider diffProvider, final long number) {
    final VcsRevisionDescription vf1Rev = diffProvider.getCurrentRevisionDescription(vf1);
    Assert.assertEquals(number, ((SvnRevisionNumber) vf1Rev.getRevisionNumber()).getLongRevisionNumber());
}
Also used : VcsRevisionDescription(com.intellij.openapi.vcs.history.VcsRevisionDescription)

Aggregations

VcsRevisionDescription (com.intellij.openapi.vcs.history.VcsRevisionDescription)3 AbstractVcs (com.intellij.openapi.vcs.AbstractVcs)1 ProjectLevelVcsManager (com.intellij.openapi.vcs.ProjectLevelVcsManager)1 DiffMixin (com.intellij.openapi.vcs.diff.DiffMixin)1 Date (java.util.Date)1 Nullable (org.jetbrains.annotations.Nullable)1