diff --git a/source/java/org/alfresco/repo/avm/AVMSyncServiceImpl.java b/source/java/org/alfresco/repo/avm/AVMSyncServiceImpl.java index 70504ff235..afe17544ee 100644 --- a/source/java/org/alfresco/repo/avm/AVMSyncServiceImpl.java +++ b/source/java/org/alfresco/repo/avm/AVMSyncServiceImpl.java @@ -599,7 +599,7 @@ public class AVMSyncServiceImpl implements AVMSyncService { throw new AVMNotFoundException("Not found: " + layerPath); } - AVMNodeDescriptor underlyingNode = fAVMService.lookup(-1, underlyingPath); + AVMNodeDescriptor underlyingNode = fAVMService.lookup(-1, underlyingPath, true); if (underlyingNode == null) { throw new AVMNotFoundException("Not found: " + underlyingPath); @@ -644,14 +644,17 @@ public class AVMSyncServiceImpl implements AVMSyncService { AVMNodeDescriptor topNode = layerListing.get(name); AVMNodeDescriptor bottomNode = underListing.get(name); + fgLogger.error("Trying to flatten out: " + name); if (bottomNode == null) { + flattened = false; continue; } // We've found an identity so flatten it. if (topNode.getId() == bottomNode.getId()) { fAVMRepository.flatten(layer, name); + fgLogger.error("Identity flattened: " + name); } else { @@ -659,6 +662,7 @@ public class AVMSyncServiceImpl implements AVMSyncService if (flatten(topNode, bottomNode)) { fAVMRepository.flatten(layer, name); + fgLogger.error("Recursively flattened: " + name); } else { @@ -706,5 +710,6 @@ public class AVMSyncServiceImpl implements AVMSyncService } mkdirs(pathParts[0]); fAVMService.createDirectory(pathParts[0], pathParts[1]); + fgLogger.error("mkdir " + pathParts[0] + " " + pathParts[1]); } } diff --git a/source/java/org/alfresco/repo/avm/actions/SimpleAVMSubmitAction.java b/source/java/org/alfresco/repo/avm/actions/SimpleAVMSubmitAction.java index ec386c1496..399400670b 100644 --- a/source/java/org/alfresco/repo/avm/actions/SimpleAVMSubmitAction.java +++ b/source/java/org/alfresco/repo/avm/actions/SimpleAVMSubmitAction.java @@ -20,6 +20,7 @@ package org.alfresco.repo.avm.actions; import java.util.List; import org.alfresco.repo.action.executer.ActionExecuterAbstractBase; +import org.alfresco.repo.avm.AVMContext; import org.alfresco.repo.avm.AVMNodeConverter; import org.alfresco.repo.domain.PropertyValue; import org.alfresco.service.cmr.action.Action; @@ -91,6 +92,7 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(actionedUponNodeRef); int version = (Integer)avmVersionPath[0]; String path = (String)avmVersionPath[1]; + fgLogger.error(path); // Get store name and path parts. String [] storePath = path.split(":"); if (storePath.length != 2) @@ -113,10 +115,14 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase // Get the difference between source and destination. List diffs = fAVMSyncService.compare(version, path, -1, avmDest); + for (AVMDifference diff : diffs) + { + fgLogger.error(diff); + } // Do the update. fAVMSyncService.update(diffs, true, true, false, false); // Cleanup by flattening the source relative to the destination. - fAVMSyncService.flatten(storePath[0] + ":/appBase", websiteName + "-staging:/appBase"); + //fAVMSyncService.flatten(storePath[0] + ":/appBase", websiteName + "-staging:/appBase"); } /**