SVN: repository changes: keep directory status also cached locally together with other information

This commit is contained in:
irengrig
2012-04-03 18:11:33 +04:00
parent b11e14ce5a
commit ff73627b76
2 changed files with 12 additions and 2 deletions
@@ -41,7 +41,7 @@ import java.util.*;
*/
public class ChangesCacheFile {
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.committed.ChangesCacheFile");
private static final int VERSION = 6;
private static final int VERSION = 7;
private final File myPath;
private final File myIndexPath;
@@ -145,6 +145,7 @@ public class SvnChangeList implements CommittedChangeList {
final boolean supportsReplaced) throws IOException {
myVcs = vcs;
myLocation = location;
myKnownAsDirectories = new HashSet<String>();
readFromStream(stream, supportsCopyFromInfo, supportsReplaced);
myCommonPathSearcher = new CommonPathSearcher();
for (String path : myAddedPaths) {
@@ -156,7 +157,6 @@ public class SvnChangeList implements CommittedChangeList {
for (String path : myChangedPaths) {
myCommonPathSearcher.next(path);
}
myKnownAsDirectories = new HashSet<String>(0);
}
public Change getByPath(final String path) {
@@ -632,6 +632,11 @@ public class SvnChangeList implements CommittedChangeList {
writeFiles(stream, myDeletedPaths);
writeMap(stream, myCopiedAddedPaths);
writeFiles(stream, myReplacedPaths);
stream.writeInt(myKnownAsDirectories.size());
for (String directory : myKnownAsDirectories) {
stream.writeUTF(directory);
}
}
// to be able to update plugin only
@@ -670,6 +675,11 @@ public class SvnChangeList implements CommittedChangeList {
if (supportsReplaced) {
readFiles(stream, myReplacedPaths);
}
final int size = stream.readInt();
for (int i = 0; i < size; i++) {
myKnownAsDirectories.add(stream.readUTF());
}
}
private static void writeMap(final DataOutput stream, final Map<String, String> map) throws IOException {