if (repos.getLocation().equals(repos.getRepositoryRoot(true))) {
rootEntry = new SVNDirEntry(url, "", SVNNodeKind.DIR, -1, false, -1, null, null);
} else {
String name = SVNPathUtil.tail(url.getPath());
SVNURL location = repos.getLocation();
repos.setLocation(location.removePathTail(), false);
Collection dirEntries = repos.getDir("", revNum, null, (Collection) null);
for (Iterator ents = dirEntries.iterator(); ents.hasNext();) {
SVNDirEntry dirEntry = (SVNDirEntry) ents.next();
// dir entry name may differ from 'name', due to renames...
if (name.equals(dirEntry.getName())) {