use of com.intellij.history.core.tree.RootEntry in project intellij-community by JetBrains.
the class ChangeRevision method findEntry.
@Override
public Entry findEntry() {
RootEntry rootCopy = myRoot.copy();
boolean revertThis = myBefore;
String path = myFacade.revertUpTo(rootCopy, myEntryPath, null, myChangeToRevert, revertThis, true);
return rootCopy.findEntry(path);
}
use of com.intellij.history.core.tree.RootEntry in project intellij-community by JetBrains.
the class LocalHistoryTestCase method changeROStatus.
public ROStatusChange changeROStatus(RootEntry root, String path, boolean status) {
Entry e = root.getEntry(path);
ROStatusChange result = new ROStatusChange(nextId(), path, e.isReadOnly());
e.setReadOnly(status);
return result;
}
use of com.intellij.history.core.tree.RootEntry in project intellij-community by JetBrains.
the class LocalHistoryTestCase method move.
public MoveChange move(RootEntry root, String path, String newParent) {
Entry e = root.getEntry(path);
MoveChange result = new MoveChange(nextId(), Paths.reparented(path, newParent), e.getParent().getPath());
e.getParent().removeChild(e);
root.getEntry(newParent).addChild(e);
return result;
}
use of com.intellij.history.core.tree.RootEntry in project intellij-community by JetBrains.
the class ChangeListTest method testRevertionUpToWithTrackingPathWithDeletionAndMovements.
@Test
public void testRevertionUpToWithTrackingPathWithDeletionAndMovements() {
add(facade, createDirectory(r, "root"));
add(facade, createDirectory(r, "root/dir1"));
add(facade, rename(r, "root/dir1", "dir2"));
add(facade, delete(r, "root/dir2"));
add(facade, createDirectory(r, "root/dir2"));
add(facade, rename(r, "root", "root2"));
RootEntry copy = r.copy();
assertEquals("root/dir2", facade.revertUpTo(copy, "root2/dir2", facade.getChangeListInTests().getChangesInTests().get(3), null, false, true));
assertTrue(copy.hasEntry("root/dir2"));
assertFalse(copy.hasEntry("root/dir1"));
assertFalse(copy.hasEntry("root1"));
copy = r.copy();
assertEquals("root/dir1", facade.revertUpTo(copy, "root2/dir2", facade.getChangeListInTests().getChangesInTests().get(3), null, true, true));
assertTrue(copy.hasEntry("root/dir1"));
assertFalse(copy.hasEntry("root/dir2"));
assertFalse(copy.hasEntry("root1"));
}
use of com.intellij.history.core.tree.RootEntry in project intellij-community by JetBrains.
the class ChangeListTest method testRevertionUpToInclusively.
@Test
public void testRevertionUpToInclusively() {
addChangeSet(facade, "1", createFile(r, "file1"));
addChangeSet(facade, "2", createFile(r, "file2"));
RootEntry copy = r.copy();
facade.revertUpTo(copy, "", facade.getChangeListInTests().getChangesInTests().get(0), null, true, true);
assertTrue(copy.hasEntry("file1"));
assertFalse(copy.hasEntry("file2"));
copy = r.copy();
facade.revertUpTo(copy, "", facade.getChangeListInTests().getChangesInTests().get(1), null, true, true);
assertFalse(copy.hasEntry("file1"));
assertFalse(copy.hasEntry("file2"));
}
Aggregations