Search in sources :

Example 1 with ByteContent

use of com.intellij.history.ByteContent in project intellij-community by JetBrains.

the class LocalHistoryFacade method getByteContentBefore.

private ByteContent getByteContentBefore(RootEntry root, String path, Change change) {
    root = root.copy();
    String newPath = revertUpTo(root, path, null, change, false, false);
    Entry entry = root.findEntry(newPath);
    if (entry == null)
        return new ByteContent(false, null);
    if (entry.isDirectory())
        return new ByteContent(true, null);
    return new ByteContent(false, entry.getContent().getBytesIfAvailable());
}
Also used : RootEntry(com.intellij.history.core.tree.RootEntry) Entry(com.intellij.history.core.tree.Entry) ByteContent(com.intellij.history.ByteContent)

Aggregations

ByteContent (com.intellij.history.ByteContent)1 Entry (com.intellij.history.core.tree.Entry)1 RootEntry (com.intellij.history.core.tree.RootEntry)1