@Override public long lastModified() throws IOException, InterruptedException { return getInfo().getDate().getTime(); }
public void handleDirEntry(SVNDirEntry entry) throws SVNException { children.add( new ChildEntry(entry.getRevision(), entry.getDate().getTime(), entry.getKind(), entry.getName())); }
private SVNDirEntry getEntry(String lastChanged, String directoryName) throws ParseException { SVNDirEntry entry = Mockito.mock(SVNDirEntry.class); Mockito.when(entry.getDate()).thenReturn(df.parse(lastChanged)); Mockito.when(entry.getName()).thenReturn(directoryName); return entry; } }
private static void list(SVNRepository repository, String path, long rev, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { Collection entries = new TreeSet(); entries = repository.getDir(path, rev, null, entries); for (Iterator iterator = entries.iterator(); iterator.hasNext();) { SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); handler.handleDirEntry(entry); if (entry.getKind() == SVNNodeKind.DIR && entry.getDate() != null && recursive) { list(repository, childPath, rev, recursive, handler); } } }
public static DirEntry createDirEntry(SVNDirEntry dirEntry) { if(dirEntry == null){ return null; } return new DirEntry( dirEntry.getRelativePath(), getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate() != null ? dirEntry.getDate().getTime()*1000 : 0, dirEntry.getAuthor() ); }
static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock); }
public boolean getIfNewer(String resourceName, File destination, long timestamp) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { try { SVNDirEntry e = queryRepo.info(combine(rootPath,resourceName), -1/*head*/); if( e.getDate().getTime() < timestamp ) return false; // older get(resourceName,destination); return true; } catch (SVNException e) { throw new ResourceDoesNotExistException("Unable to find "+resourceName+" in "+getRepository().getUrl(),e); } }
public static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
static SVNInfo createInfo(String path, SVNURL reposRootURL, String uuid, SVNURL url, SVNRevision revision, SVNDirEntry dirEntry, SVNLock lock) { if (dirEntry == null) { return null; } return new SVNInfo(path, url, revision, dirEntry.getKind(), uuid, reposRootURL, dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor(), lock, SVNDepth.UNKNOWN, dirEntry.getSize()); }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { if (entries != null) { dirEntry = new SVNDirEntry(url.appendPath(dirEntry.getName(), false), repositoryRoot, dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor()); entries.add(dirEntry); } } };
public Date getLastModified(long revision) throws GetLastModifiedException { try { if (!exists()) { throw new GetLastModifiedException(this, null); } } catch (ExistsException e) { throw new GetLastModifiedException(this, e); } try { return root.getRepository().info(path, revision).getDate(); } catch (SVNException e) { throw new GetLastModifiedException(this, e); } }
protected static DirEntry getDirEntry(SVNDirEntry dirEntry, String reposRelativePath) { if (dirEntry == null) { return null; } return new DirEntry(dirEntry.getRelativePath(), SVNPathUtil.append(reposRelativePath, dirEntry.getRelativePath()), SVNClientImpl.getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate().getTime(), dirEntry.getAuthor()); }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { handler.handleDirEntry(new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor())); } };
private DirEntry getDirEntry(SVNDirEntry dirEntry) { if (dirEntry == null) { return null; } String repositoryRootString = getUrlString(dirEntry.getRepositoryRoot()); String urlString = getUrlString(dirEntry.getURL()); String absolutePath = SVNPathUtil.getRelativePath(repositoryRootString, urlString); return new DirEntry(dirEntry.getRelativePath(), absolutePath, getNodeKind(dirEntry.getKind()), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), getLongDate(dirEntry.getDate()), dirEntry.getAuthor()); }
private SvnInfo creatSvnInfoForEntry(SVNURL root, String uuid, SVNDirEntry entry, SVNURL entryURL, long revision, SVNLock lock) { SvnInfo info = new SvnInfo(); info.setKind(entry.getKind()); info.setLastChangedAuthor(entry.getAuthor()); info.setLastChangedDate(SVNDate.fromDate(entry.getDate())); info.setLastChangedRevision(entry.getRevision()); info.setLock(lock); info.setRepositoryRootURL(root); info.setRepositoryUuid(uuid); info.setSize(entry.getSize()); info.setUrl(entryURL); info.setRevision(revision); return info; }