mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
This checkin does two things:
1. Refines the semantics of ghost creation, so that they only appear when warranted. 2. Implements a mechanism for filtering out files which should not appear in comparison results or be pushed along by updates. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4525 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -555,6 +555,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
ChildKey key = new ChildKey(this, name);
|
||||
ChildEntry entry = AVMDAOs.Instance().fChildEntryDAO.get(key);
|
||||
AVMNode child = null;
|
||||
boolean indirect = false;
|
||||
if (entry != null)
|
||||
{
|
||||
child = entry.getChild();
|
||||
@@ -567,13 +568,21 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
||||
else
|
||||
{
|
||||
child = lookupChild(lPath, name, false);
|
||||
indirect = true;
|
||||
}
|
||||
if (child != null && (indirect || child.getStoreNew() == null || child.getAncestor() != null))
|
||||
{
|
||||
AVMNode ghost = new DeletedNodeImpl(lPath.getAVMStore().getAVMRepository().issueID(),
|
||||
lPath.getAVMStore());
|
||||
AVMDAOs.Instance().fAVMNodeDAO.save(ghost);
|
||||
AVMDAOs.Instance().fAVMNodeDAO.flush();
|
||||
ghost.setAncestor(child);
|
||||
this.putChild(name, ghost);
|
||||
}
|
||||
else
|
||||
{
|
||||
AVMDAOs.Instance().fAVMNodeDAO.flush();
|
||||
}
|
||||
AVMNode ghost = new DeletedNodeImpl(lPath.getAVMStore().getAVMRepository().issueID(),
|
||||
lPath.getAVMStore());
|
||||
AVMDAOs.Instance().fAVMNodeDAO.save(ghost);
|
||||
AVMDAOs.Instance().fAVMNodeDAO.flush();
|
||||
ghost.setAncestor(child);
|
||||
this.putChild(name, ghost);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user