FSNodeHistory hist = FSNodeHistory.getNodeHistory(myReposRootDir, root, path);
FSNodeHistory hist = FSNodeHistory.getNodeHistory(myReposRootDir, root, path, myRevNodesPool);
    public long log(String[] targetPaths, long startRevision, long endRevision, boolean discoverChangedPaths, boolean strictNode, long limit, ISVNLogEntryHandler handler) throws SVNException {    	try{    		openRepository();            String[] absPaths = null;            if(targetPaths != null){                absPaths = new String[targetPaths.length];                for(int i = 0; i < targetPaths.length; i++){                    absPaths[i] = SVNPathUtil.canonicalizeAbsPath(getRepositoryPath(targetPaths[i]));                }            }            long histStart = startRevision;            long histEnd = endRevision;                        long youngestRev = FSReader.getYoungestRevision(myReposRootDir);            if(isInvalidRevision(startRevision)){                startRevision = youngestRev;            }            if(isInvalidRevision(endRevision)){                endRevision = youngestRev;            }            /* Check that revisions are sane before ever invoking the handler. */            if(startRevision > youngestRev){                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "No such revision {0,number,integer}", new Long(startRevision));                SVNErrorManager.error(err);            }            if(endRevision > youngestRev){                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NO_SUCH_REVISION, "No such revision {0,number,integer}", new Long(endRevision));                SVNErrorManager.error(err);            }            /* Get an ordered copy of the start and end. */        	if(startRevision > endRevision){        		histStart = endRevision;        		histEnd = startRevision;        	}        	/* If paths were specified, then we only really care about revisions            *  in which those paths were changed.  So we ask the filesystem for            *  all the revisions in which any of the paths was changed.            *              *  SPECIAL CASE: If we were given the only path, and that path is "/" or empty,            *  then the results are the same as if we were passed no paths at            *  all.  Why?  Because the answer to the question "In which            *  revisions was the root of the filesystem changed?" is always            *  "Every single one of them."  And since this section of code is            *  only about answering that question, and we already know the            *  answer.            */        	long sendCount = 0;        	if(absPaths == null || absPaths.length == 0 || (absPaths.length == 1 && "/".equals(absPaths[0]))){                /* They want history for the root path, so every rev has a change. */                sendCount = histEnd - histStart + 1;        		if(limit != 0 && sendCount > limit){        			sendCount = limit;        		}        		for(int i = 0; i < sendCount; i++){        			long rev = histStart + i;        			if(startRevision > endRevision){        				rev = histEnd - i;        			}        		                    if(handler != null){                        FSReader.sendChangeRev(myReposRootDir, myRevNodesPool, rev, discoverChangedPaths, handler);                    }        		}                return sendCount;        	}            /* Create a history object for each path so we can walk through             * them all at the same time until we have all changes or LIMIT             * is reached.             */        	LinkedList histories = new LinkedList();            FSRoot root = FSRoot.createRevisionRoot(histEnd, myRevNodesPool.getRootRevisionNode(histEnd, myReposRootDir));            for(int i = 0; i < absPaths.length; i++){        		String path = absPaths[i];        		/* if there is no path at specified root, SVNException is thrown */                FSNodeHistory hist = FSNodeHistory.getNodeHistory(myReposRootDir, root, path);                LogPathInfo info = new LogPathInfo(hist);        		info.pickUpNextHistory(myReposRootDir, strictNode, histStart);        		histories.addLast(info);        	}            /* Loop through all the revisions in the range and add any             * where a path was changed to the array, or if they wanted             * history in reverse order just send it to them right away.             */            LinkedList revisions = null;            boolean anyHistoriesLeft = true;            for(long currentRev = histEnd; currentRev >= histStart && anyHistoriesLeft; currentRev = getNextHistoryRevision(histories)){                boolean changed = false;                anyHistoriesLeft = false;                for(ListIterator infoes = histories.listIterator(); infoes.hasNext();){                    LogPathInfo info = (LogPathInfo)infoes.next();                    /* Check history for this path in current rev. */                    if(info.checkHistory(myReposRootDir, currentRev, strictNode, histStart)){                        changed = true;                    }                    if(info.getHistory() != null){                        anyHistoriesLeft = true;                    }                }                /* If any of the paths changed in this rev then add or send it. */                if(changed){                    /* If they wanted it in reverse order we can send it completely                     * right now.                      */                    if(startRevision > endRevision){                         if(handler != null){                            FSReader.sendChangeRev(myReposRootDir, myRevNodesPool, currentRev, discoverChangedPaths, handler);                        }                        if(limit != 0 && ++sendCount >= limit){                            break;                        }                    }else{                        /* They wanted it in forward order, so we have to buffer up                         * a list of revs and process it later.                          */                        if(revisions == null){                            revisions = new LinkedList();                        }                           revisions.addFirst(new Long(currentRev));                    }                }            }            if(revisions != null){                /* Work loop for processing the revisions we found since they wanted                 * history in forward order.                  */                int i = 0;                for(ListIterator revs = revisions.listIterator(); revs.hasNext();){                    FSReader.sendChangeRev(myReposRootDir, myRevNodesPool, ((Long)revs.next()).longValue(), discoverChangedPaths, handler);                    if(limit != 0 && ++i >= limit){                        break;                    }                }                return i;            }            return sendCount;    	}finally{    		closeRepository();    	}    }    