more VFS logging for blinking PerforceMoveRenameTest

This commit is contained in:
peter
2015-08-25 19:06:47 +02:00
parent 5654d16c30
commit ac6c8c60e7
2 changed files with 13 additions and 5 deletions
@@ -1027,6 +1027,9 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
}
private VirtualFileSystemEntry applyEvent(@NotNull VFileEvent event) {
if (LOG.isDebugEnabled()) {
LOG.debug("Applying " + event);
}
try {
if (event instanceof VFileCreateEvent) {
final VFileCreateEvent createEvent = (VFileCreateEvent)event;
@@ -1050,17 +1053,22 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
}
else if (event instanceof VFilePropertyChangeEvent) {
final VFilePropertyChangeEvent propertyChangeEvent = (VFilePropertyChangeEvent)event;
VirtualFile file = propertyChangeEvent.getFile();
Object newValue = propertyChangeEvent.getNewValue();
if (VirtualFile.PROP_NAME.equals(propertyChangeEvent.getPropertyName())) {
executeRename(propertyChangeEvent.getFile(), (String)propertyChangeEvent.getNewValue());
executeRename(file, (String)newValue);
}
else if (VirtualFile.PROP_WRITABLE.equals(propertyChangeEvent.getPropertyName())) {
executeSetWritable(propertyChangeEvent.getFile(), ((Boolean)propertyChangeEvent.getNewValue()).booleanValue());
executeSetWritable(file, ((Boolean)newValue).booleanValue());
if (LOG.isDebugEnabled()) {
LOG.debug("File " + file + " writable=" + file.isWritable());
}
}
else if (VirtualFile.PROP_HIDDEN.equals(propertyChangeEvent.getPropertyName())) {
executeSetHidden(propertyChangeEvent.getFile(), ((Boolean)propertyChangeEvent.getNewValue()).booleanValue());
executeSetHidden(file, ((Boolean)newValue).booleanValue());
}
else if (VirtualFile.PROP_SYMLINK_TARGET.equals(propertyChangeEvent.getPropertyName())) {
executeSetTarget(propertyChangeEvent.getFile(), (String)propertyChangeEvent.getNewValue());
executeSetTarget(file, (String)newValue);
}
}
}
@@ -147,7 +147,7 @@ public class RefreshWorker {
boolean currentWritable = persistence.isWritable(file);
boolean upToDateWritable = attributes.isWritable();
if (LOG_ATTRIBUTES.isDebugEnabled()) {
LOG_ATTRIBUTES.debug("file=%s writable vfs=%b persistence=%b real=%b", file, file.isWritable(), currentWritable, upToDateWritable);
LOG_ATTRIBUTES.debug("file=" + file + " writable vfs=" + file.isWritable() + " persistence=" + currentWritable + " real=" + upToDateWritable);
}
if (currentWritable != upToDateWritable) {
scheduleAttributeChange(file, VirtualFile.PROP_WRITABLE, currentWritable, upToDateWritable);