mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Turning off flatten after submit for now as flatten is buggy.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3906 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
@@ -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<AVMDifference> 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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user