public void report(ISVNReporter reporter) throws SVNException { reporter.setPath("", null, lastRev, true); reporter.finishReport(); } }, editor);
public void report(ISVNReporter reporter) throws SVNException { try { /* * Here empty working copy is reported. * * ISVNReporter includes methods that allows to report mixed-rev working copy * and even let server know that some files or directories are locally missing or * locked. */ reporter.setPath("", null, exportRevision, true); /* * Don't forget to finish the report! */ reporter.finishReport(); } catch (SVNException svne) { reporter.abortReport(); System.out.println("Report failed."); } } }
public void report(ISVNReporter reporter) throws SVNException { reporter.setPath("", null, lastRev, SVNDepth.INFINITY, false); for (Iterator ps = pathsList.iterator(); ps.hasNext();) { String path = (String) ps.next(); reporter.deletePath(path); } reporter.finishReport(); } };
public void report(ISVNReporter reporter) throws SVNException { WCDbBaseInfo baseInfo = null; try { baseInfo = context.getDb().getBaseInfo(localAbsPath, BaseInfoField.kind, BaseInfoField.revision, BaseInfoField.reposRelPath, BaseInfoField.reposRootUrl, BaseInfoField.updateRoot, BaseInfoField.lock); if (baseInfo.kind == SVNWCDbKind.Dir || !baseInfo.updateRoot) { reporter.setPath("", null, 0, SVNDepth.INFINITY, false); reporter.deletePath(""); } else { if (restoreFiles) { SVNFileType ft = SVNFileType.getType(localAbsPath); if (ft == SVNFileType.NONE) { SVNReporter17.restoreNode(context, localAbsPath, SVNWCDbKind.File, baseInfo.revision, useCommitTimes); } } reporter.setPath("", null, baseInfo.revision, SVNDepth.INFINITY, false); SVNURL url = baseInfo.reposRootUrl.appendPath(SVNFileUtil.getFilePath(baseInfo.reposRelPath), false); String lockToken = baseInfo.lock != null ? baseInfo.lock.token : null; reporter.linkPath(url, "", lockToken, baseInfo.revision, SVNDepth.INFINITY, false); } } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() != SVNErrorCode.WC_PATH_NOT_FOUND) { throw e; } reporter.setPath("", null, 0, SVNDepth.INFINITY, false); reporter.deletePath(""); } reporter.finishReport(); }
public void applyTo(org.tmatesoft.svn.core.io.ISVNReporter reporter) throws SVNException { switch (kind) { case SET_PATH: reporter.setPath(path, lockToken, revision, SVNClientImpl.getDepth(depth), startEmpty); break; case LINK_PATH: reporter.linkPath(SVNURL.parseURIEncoded(url), path, lockToken, revision, SVNClientImpl.getDepth(depth), startEmpty); break; case DELETE_PATH: reporter.deletePath(path); break; default: throw new IllegalStateException("Uknown kind " + kind); } } }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { myReporter.setPath(path, lockToken, revision, depth, startEmpty); } }
public void finishReport() throws SVNException { // collect locks SVNLock[] locks = null; try { myRepositoryRoot = myRepository.getRepositoryRoot(true); locks = myRepository.getLocks(""); } catch (SVNException e) { if (!(e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_IMPLEMENTED)) { throw e; } } if (locks != null) { for (int i = 0; i < locks.length; i++) { SVNLock lock = locks[i]; myLocks.put(lock.getPath(), lock); } } myEditor.setRepositoryInfo(myRepositoryRoot, myLocks); myReporter.finishReport(); }
public void linkPath(SVNURL url, String path, String lockToken, long revison, boolean startEmpty) throws SVNException { String rootURL = SVNPathUtil.getCommonURLAncestor(url.toString(), myRepositoryLocation); if (rootURL.length() < myRepositoryLocation.length()) { myRepositoryLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revison, startEmpty); }
public void abortReport() throws SVNException { myReporter.abortReport(); }
public void deletePath(String path) throws SVNException { myReporter.deletePath(path); }
SVNEntry parentEntry = wcAccess.getEntry(myTarget.getParentFile(), false); long revision = parentEntry.getRevision(); reporter.setPath("", null, revision, targetEntry != null ? targetEntry.isIncomplete() : true); reporter.deletePath(""); reporter.finishReport(); return; reporter.setPath("", null, revision, targetEntry.isIncomplete()); reporter.deletePath(""); } else { reportEntries(reporter, targetArea, "", revision, targetEntry.isIncomplete(), myIsRecursive); if (parentEntry != null && !expectedURL.equals(url)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, "", targetEntry.getLockToken(), targetEntry.getRevision(), false); } else if (targetEntry.getRevision() != revision || targetEntry.getLockToken() != null) { reporter.setPath("", targetEntry.getLockToken(), targetEntry.getRevision(), false); reporter.finishReport(); } catch (Throwable th) { myLog.info(th); try { reporter.abortReport(); } catch (SVNException e) { myLog.info(e);
reporter.setPath(thisReportRelpath, null, dirRev, SVNDepth.EXCLUDE, false); } else { if (!reportEverything) { reporter.deletePath(thisReportRelpath); reporter.deletePath(thisReportRelpath); if (thisSwitched) { SVNURL url = SVNWCUtils.join(dirReposRoot, ths.reposRelPath); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); } else { reporter.setPath(thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); } else if (ths.revision != dirRev || ths.lock != null || dirDepth == SVNDepth.EMPTY) { reporter.setPath(thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); if (thisSwitched) { SVNURL url = SVNWCUtils.join(dirReposRoot, ths.reposRelPath); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, reportDepth, startEmpty); } else { reporter.setPath(thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, reportDepth, startEmpty);
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { myReporter.setPath(path, lockToken, revision, depth, startEmpty); } }
public void finishReport() throws SVNException { // collect locks SVNLock[] locks = null; try { myRepositoryRoot = myRepository.getRepositoryRoot(true); locks = myRepository.getLocks(""); } catch (SVNException e) { if (!(e.getErrorMessage() != null && e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_IMPLEMENTED)) { throw e; } } finally { myRepository.closeSession(); } if (locks != null) { for (int i = 0; i < locks.length; i++) { SVNLock lock = locks[i]; myLocks.put(lock.getPath(), lock); } } myEditor.setRepositoryInfo(myRepositoryRoot, myLocks); myReporter.finishReport(); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { SVNURL rootURL = SVNURLUtil.getCommonURLAncestor(url, myRepositoryLocation); if (SVNPathUtil.getPathAsChild(rootURL.getPath(), myRepositoryLocation.getPath()) != null) { myRepositoryLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revision, depth, startEmpty); }
public void abortReport() throws SVNException { myReporter.abortReport(); }
public void deletePath(String path) throws SVNException { this.reporter.deletePath(path); }
public void report(ISVNReporter reporter) throws SVNException { //TODO(sd): dynamic depth here reporter.setPath("", null, rev1, SVNDepth.INFINITY, false); reporter.finishReport(); } };
depth = SVNDepth.INFINITY; reporter.setPath("", null, 0, depth, false); reporter.deletePath(""); reporter.finishReport(); return; reportDepth = depth; reporter.setPath("", null, target_rev, reportDepth, start_empty); if (target_kind == SVNWCDbKind.Dir) { if (depth != SVNDepth.EMPTY) { if (!repos_relpath.equals(SVNFileUtil.createFilePath(parentInfo.reposRelPath, base))) { SVNURL url = SVNWCUtils.join(repos_root, repos_relpath); reporter.linkPath(url, "", target_lock != null ? target_lock.token : null, target_rev, SVNDepth.INFINITY, false); } else if (target_lock != null) { reporter.setPath("", target_lock.token, target_rev, SVNDepth.INFINITY, false); reporter.finishReport(); } catch (SVNException e) { reporter.abortReport(); } catch (SVNException inner) { e.getErrorMessage().setChildErrorMessage(inner.getErrorMessage());
if (entry.isDeleted() || entry.isAbsent()) { if (!reportAll) { reporter.deletePath(path); if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), false); } else { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), false); } else if (entry.getRevision() != dirRevision || entry.getLockToken() != null) { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false); reporter.deletePath(path); if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); } else { reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); } else if (childEntry.getLockToken() != null || childEntry.getRevision() != dirRevision || childEntry.isIncomplete()) { reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete());