/** * Verifies the data stored in the repository. This method uses the dump implementation * (non incremental, beginning with revision 0, ending at the latest one) * passing a dummy output stream to it. This allows to check the integrity of the * repository data. * * <p/> * This is identical to <code>doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD)</code>. * * @param repositoryRoot a repository root directory path * @throws SVNException verification failed - a repository may be corrupted * @since 1.1.1 */ public void doVerify(File repositoryRoot) throws SVNException { doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD); }
/** * Verifies the data stored in the repository. This method uses the dump implementation * (non incremental, beginning with revision 0, ending at the latest one) * passing a dummy output stream to it. This allows to check the integrity of the * repository data. * * <p/> * This is identical to <code>doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD)</code>. * * @param repositoryRoot a repository root directory path * @throws SVNException verification failed - a repository may be corrupted * @since 1.1.1 */ public void doVerify(File repositoryRoot) throws SVNException { doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD); }
/** * Verifies the data stored in the repository. This method uses the dump implementation * (non incremental, beginning with revision 0, ending at the latest one) * passing a dummy output stream to it. This allows to check the integrity of the * repository data. * * <p/> * This is identical to <code>doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD)</code>. * * @param repositoryRoot a repository root directory path * @throws SVNException verification failed - a repository may be corrupted * @since 1.1.1 */ public void doVerify(File repositoryRoot) throws SVNException { doVerify(repositoryRoot, SVNRevision.create(0), SVNRevision.HEAD); }
public void verify(File path, final OutputStream messageOut, Revision start, Revision end, ReposNotifyCallback callback) throws ClientException { beforeOperation(); try { getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (messageOut != null && event.getAction() == SVNAdminEventAction.REVISION_DUMPED) { try { messageOut.write(event.getMessage().getBytes()); messageOut.write(client.getOptions().getNativeEOL()); } catch (IOException e) { } } } }); getAdminClient().doVerify(path.getAbsoluteFile(), SVNClientImpl.getSVNRevision(start), SVNClientImpl.getSVNRevision(end)); } catch (SVNException e) { try { if (messageOut != null) { messageOut.write(e.getErrorMessage().getFullMessage().getBytes("UTF-8")); messageOut.write(client.getOptions().getNativeEOL()); } } catch (IOException e1) { // } throwException(e, client); } finally { afterOperation(); } }
getAdminClient().doVerify(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(start), JavaHLObjectFactory.getSVNRevision(end)); } catch (SVNException e) { try {
getAdminClient().doVerify(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(start), JavaHLObjectFactory.getSVNRevision(end)); } catch (SVNException e) { try {
getAdminClient().doVerify(new File(path).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(start), JavaHLObjectFactory.getSVNRevision(end)); } catch (SVNException e) { try {
@Override protected SVNAdminEvent run() throws SVNException { SVNAdminClient ac = new SVNAdminClient(getOperation().getAuthenticationManager(), getOperation().getOptions()); ac.setEventHandler(this); ac.doVerify(getOperation().getRepositoryRoot(), getOperation().getStartRevision(), getOperation().getEndRevision()); return getOperation().first(); }
public void run() throws SVNException { SVNRevision start = getSVNAdminEnvironment().getStartRevision(); SVNRevision end = getSVNAdminEnvironment().getEndRevision(); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository); long endRev = getRevisionNumber(end, latestRevision, repository); if (startRev < 0) { startRev = 0; endRev = latestRevision; } else if (endRev < 0) { endRev = startRev; } if (startRev > endRev) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "First revision cannot be higher than second"), SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); if (!getSVNAdminEnvironment().isQuiet()) { client.setEventHandler(this); } client.doVerify(getLocalRepository(), SVNRevision.create(startRev), SVNRevision.create(endRev)); }
public void run() throws SVNException { SVNRevision start = getSVNAdminEnvironment().getStartRevision(); SVNRevision end = getSVNAdminEnvironment().getEndRevision(); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.fromFile(getLocalRepository())); repository.setCanceller(getEnvironment()); long latestRevision = repository.getLatestRevision(); long startRev = getRevisionNumber(start, latestRevision, repository); long endRev = getRevisionNumber(end, latestRevision, repository); if (startRev < 0) { startRev = 0; endRev = latestRevision; } else if (endRev < 0) { endRev = startRev; } if (startRev > endRev) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "First revision cannot be higher than second"), SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); if (!getSVNAdminEnvironment().isQuiet()) { client.setEventHandler(this); } client.doVerify(getLocalRepository(), SVNRevision.create(startRev), SVNRevision.create(endRev)); }