mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Adjusted AVMCrawlTestPP to be more stringent now that we have retryin
transactions. History is noww correctly maintained for cases of deletes followed by renames or creates. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4587 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -596,11 +596,12 @@ public class AVMRepository
|
||||
throw new AVMNotFoundException("Path not found.");
|
||||
}
|
||||
DirectoryNode dstDir = (DirectoryNode)dPath.getCurrentNode();
|
||||
AVMNode dstNode = dstDir.lookupChild(dPath, dstName, false);
|
||||
if (dstNode != null)
|
||||
AVMNode child = dstDir.lookupChild(dPath, dstName, true);
|
||||
if (child != null && child.getType() != AVMNodeType.DELETED_NODE)
|
||||
{
|
||||
throw new AVMExistsException("Node exists: " + dstName);
|
||||
}
|
||||
AVMNode dstNode = null;
|
||||
// We've passed the check, so we can go ahead and do the rename.
|
||||
if (srcNode.getType() == AVMNodeType.PLAIN_DIRECTORY)
|
||||
{
|
||||
@@ -682,9 +683,16 @@ public class AVMRepository
|
||||
srcDir.removeChild(sPath, srcName);
|
||||
srcDir.updateModTime();
|
||||
dstNode.setVersionID(dstRepo.getNextVersionID());
|
||||
if (child != null)
|
||||
{
|
||||
dstNode.setAncestor(child);
|
||||
}
|
||||
dstDir.putChild(dstName, dstNode);
|
||||
dstDir.updateModTime();
|
||||
dstNode.setAncestor(srcNode);
|
||||
if (child == null)
|
||||
{
|
||||
dstNode.setAncestor(srcNode);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user