mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-31159
This commit is contained in:
+2
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,12 +15,8 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.dateOrRevision;
|
||||
|
||||
import com.intellij.cvsSupport2.application.CvsEntriesManager;
|
||||
import com.intellij.cvsSupport2.history.CvsRevisionNumber;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.netbeans.lib.cvsclient.admin.Entry;
|
||||
import org.netbeans.lib.cvsclient.command.Command;
|
||||
|
||||
|
||||
@@ -30,17 +26,11 @@ import org.netbeans.lib.cvsclient.command.Command;
|
||||
public class SimpleRevision implements RevisionOrDate {
|
||||
private final String myRevision;
|
||||
|
||||
public static SimpleRevision createForTheSameVersionOf(@NotNull VirtualFile file) {
|
||||
Entry entry = CvsEntriesManager.getInstance().getEntryFor(file.getParent(), file.getName());
|
||||
return new SimpleRevision(entry.getRevision());
|
||||
|
||||
}
|
||||
|
||||
public SimpleRevision(String revision) {
|
||||
myRevision = prepareRevision(revision);
|
||||
}
|
||||
|
||||
private String prepareRevision(String revision) {
|
||||
private static String prepareRevision(String revision) {
|
||||
if (revision == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -567,9 +567,10 @@ public class CvsChangeProvider implements ChangeProvider {
|
||||
final Entry entry = myEntriesManager.getEntryFor(virtualFile.getParent(), virtualFile.getName());
|
||||
if (entry != null) {
|
||||
revision = entry.getRevision();
|
||||
operation = GetFileContentOperation.createForFile(virtualFile, new SimpleRevision(revision));
|
||||
} else {
|
||||
operation = GetFileContentOperation.createForFile(myPath);
|
||||
}
|
||||
|
||||
operation = GetFileContentOperation.createForFile(virtualFile, SimpleRevision.createForTheSameVersionOf(virtualFile));
|
||||
}
|
||||
else {
|
||||
operation = GetFileContentOperation.createForFile(myPath);
|
||||
|
||||
Reference in New Issue
Block a user