FSRevisionNode curRev = FSReader.getRevisionNode(reposRootDir, path, copyDstRoot, 0); if(parentPath.getRevNode() == null || curRev.getId() == null){  return null; } if(FSID.checkIdsRelated(parentPath.getRevNode().getId(), curRev.getId()) == false){
FSRevisionNode curRev = myRevNodesPool.getRevisionNode(copyDstRoot, path, myReposRootDir); if(!FSID.checkIdsRelated(parentPath.getRevNode().getId(), curRev.getId())){
    public FSClosestCopy closestCopy(File reposRootDir, FSRevisionNode root, String path) throws SVNException{    	if(path == null){    		return null;    	}    	        FSParentPath parentPath = myRevNodesPool.getParentPath(FSRoot.createRevisionRoot(root.getId().getRevision(), root), path, true, reposRootDir);        if(parentPath == null){            return null;        }    	       /* Find the youngest copyroot in the path of this node-rev, which        * will indicate the target of the innermost copy affecting the node-rev*/    	    	    	SVNLocationEntry copyDstEntry = FSNodeHistory.findYoungestCopyroot(reposRootDir, parentPath);    	if(copyDstEntry == null || copyDstEntry.getRevision() == 0){    		/*There are no copies affecting this node-rev or copyRoot wasn't find*/    		return null;    	}    	       /* It is possible that this node was created from scratch at some        * revision between COPY_DST_REV and REV.  Make sure that PATH        * exists as of COPY_DST_REV and is related to this node-rev */        FSRevisionNode copyDstRoot = FSReader.getRootRevNode(reposRootDir, copyDstEntry.getRevision());    	SVNNodeKind kind = checkNodeKind(path, FSRoot.createRevisionRoot(copyDstEntry.getRevision(), copyDstRoot));    	if(kind == SVNNodeKind.NONE){            return null;    	}   		FSRevisionNode curRev = FSReader.getRevisionNode(reposRootDir, path, copyDstRoot, 0);        if(parentPath.getRevNode() == null || curRev.getId() == null){            /*no speech about relation*/            return null;        }        if(FSID.checkIdsRelated(parentPath.getRevNode().getId(), curRev.getId()) == false){			return null;		}    		  /* One final check must be done here.  If you copy a directory and       * create a new entity somewhere beneath that directory in the same       * txn, then we can't claim that the copy affected the new entity.       * For example, if you do:       *        *            copy dir1 dir2       *            create dir2/new-thing       *            commit       *                   * then dir2/new-thing was not affected by the copy of dir1 to dir2.       * We detect this situation by asking if PATH@COPY_DST_REV's       * created-rev is COPY_DST_REV, and that node-revision has no       * predecessors, then there is no relevant closest copy*/        long createdRev = parentPath.getRevNode().getId().getRevision();    	    	if(createdRev == copyDstEntry.getRevision()){    		if(parentPath.getRevNode().getPredecessorId() == null){    			return null;    		}    	}    	    	return new FSClosestCopy(copyDstRoot, copyDstEntry.getPath());    }