mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-102641 Do not cache file revision content (in ContentRevisionCache) if revision number is explicitly set to HEAD
This commit is contained in:
@@ -165,14 +165,23 @@ public class SvnFileRevision implements VcsFileRevision {
|
||||
}
|
||||
|
||||
public byte[] getContent() throws IOException, VcsException {
|
||||
return ContentRevisionCache.getOrLoadAsBytes(myVCS.getProject(), VcsUtil.getFilePathOnNonLocal(myURL, false), getRevisionNumber(),
|
||||
myVCS.getKeyInstanceMethod(), ContentRevisionCache.UniqueType.REMOTE_CONTENT,
|
||||
new Throwable2Computable<byte[], VcsException, IOException>() {
|
||||
@Override
|
||||
public byte[] compute() throws VcsException, IOException {
|
||||
return loadContent();
|
||||
}
|
||||
});
|
||||
byte[] result;
|
||||
|
||||
if (SVNRevision.HEAD.equals(myRevision)) {
|
||||
result = loadContent();
|
||||
}
|
||||
else {
|
||||
result = ContentRevisionCache.getOrLoadAsBytes(myVCS.getProject(), VcsUtil.getFilePathOnNonLocal(myURL, false), getRevisionNumber(),
|
||||
myVCS.getKeyInstanceMethod(), ContentRevisionCache.UniqueType.REMOTE_CONTENT,
|
||||
new Throwable2Computable<byte[], VcsException, IOException>() {
|
||||
@Override
|
||||
public byte[] compute() throws VcsException, IOException {
|
||||
return loadContent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getCopyFromPath() {
|
||||
|
||||
Reference in New Issue
Block a user