void (final VirtualFile file) { if (myStorageForUndo == null) { try { myStorageForUndo = FileUtil.createTempDirectory("svnUndoStorage", ""); } catch (IOException e) { LOG.error(e); return; } } final File tmpFile = FileUtil.findSequentNonexistentFile(myStorageForUndo, "tmp", ""); myUndoStorageContents.add(0, Couple.of(virtualToIoFile(file), tmpFile)); virtualToIoFile(file).renameTo(tmpFile); }