protected SVNDiffClient getSVNDiffClient() { return getClientManager().getDiffClient(); }
protected SVNDiffClient getSVNDiffClient() { return getClientManager().getDiffClient(); }
protected SVNDiffClient getSVNDiffClient() { return getClientManager().getDiffClient(); }
public static ByteArrayOutputStream diff( SVNClientManager clientManager, File baseDir, SVNRevision startRevision, SVNRevision endRevision ) throws SVNException { ByteArrayOutputStream result = new ByteArrayOutputStream(); /* * SVNRevision.HEAD means the latest revision. * Returns SVNCommitInfo containing information on the new revision committed * (revision number, etc.) */ clientManager.getDiffClient().doDiff( baseDir, startRevision, startRevision, endRevision, true, true, result ); return result; }
protected SVNDiffClient getSVNDiffClient(){ return getClientManager().getDiffClient(); }
protected SVNDiffClient getDiffClient(SVNRepository repository) { return getClientManager(repository).getDiffClient(); }
private String getDiffText(SVNRepository repository, SVNURL url, SVNLogEntryPath entry, long revision) { try { SVNClientManager clientManager = SVNClientManager.newInstance(null, repository.getAuthenticationManager()); SVNDiffClient diffClient = clientManager.getDiffClient(); ByteArrayOutputStream out = new ByteArrayOutputStream(); SVNRevision startRevision = SVNRevision.create(revision - 1); SVNRevision endRevision = SVNRevision.create(revision); diffClient.doDiff(url, startRevision, startRevision, endRevision, SVNDepth.FILES, true, out); String diffText = out.toString("UTF-8"); if (diffText.length() > MAX_SIZE_OF_A_DIFF) { log.error("diffs for " + entry.getPath() + " too big"); diffText = "-- TOO BIG --"; } return diffText; } catch (Exception e) { return ""; } }
/** * show diff between local file and repository file. * * @param file file to get diff * @return string diff * @throws VCSException */ @Override public String getDiff(File file) throws VCSException { String diff = null; try { ByteArrayOutputStream byte1 = new ByteArrayOutputStream(); SVNDiffClient diffClient = getSVNManager().getDiffClient(); diffClient.doDiff(file, // File path1, SVNRevision.HEAD, // SVNRevision rN, file, // File path2, SVNRevision.WORKING, // SVNRevision rM, SVNDepth.IMMEDIATES, // SVNDepth depth, false, // boolean useAncestry, byte1, // OutputStream result, null); // Collection changeLists diff = byte1.toString(); byte1.close(); } catch (SVNException e) { throw new VCSException(t("isisfish.vcs.vcssvn.diff.error"), e); } catch (IOException e) { throw new VCSException(t("isisfish.vcs.vcssvn.diff.error"), e); } return diff; }
try { SVNDiffClient client = diffClientManager.getDiffClient(); client.setShowCopiesAsAdds(false);
try { SVNDiffClient client = diffClientManager.getDiffClient(); client.setShowCopiesAsAdds(false);
javaRepo.getClientManager().getDiffClient().setEventHandler( handler ); javaRepo.getClientManager().getDiffClient().setEventHandler( null );
public void run() throws SVNException { final List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); final int targetsCount = targets.size(); if (targetsCount < 1 || targetsCount > 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } final SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); if (!getSVNEnvironment().isQuiet()) { client.setEventHandler(printer); } final File patchPath = new File((String) targets.get(0)); final File targetPath = new File(targetsCount != 2 ? "." : (String) targets.get(1)); try { client.doPatch(patchPath.getAbsoluteFile(), targetPath.getAbsoluteFile(), getSVNEnvironment().isDryRun(), getSVNEnvironment().getStripCount(), getSVNEnvironment().isIgnoreWhitespace(), true, getSVNEnvironment().isReverseDiff()); } catch (SVNException e) { getSVNEnvironment().handleWarning(e.getErrorMessage(), new SVNErrorCode[] { SVNErrorCode.ENTRY_EXISTS, SVNErrorCode.WC_PATH_NOT_FOUND }, getSVNEnvironment().isQuiet()); } finally { if (!getSVNEnvironment().isQuiet()) { StringBuffer status = new StringBuffer(); printer.printConflictStatus(status); getSVNEnvironment().getOut().print(status); } } }
public void run() throws SVNException { final List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); final int targetsCount = targets.size(); if (targetsCount < 1 || targetsCount > 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } final SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); if (!getSVNEnvironment().isQuiet()) { client.setEventHandler(printer); } final File patchPath = new File((String) targets.get(0)); final File targetPath = new File(targetsCount != 2 ? "." : (String) targets.get(1)); try { client.doPatch(patchPath.getAbsoluteFile(), targetPath.getAbsoluteFile(), getSVNEnvironment().isDryRun(), getSVNEnvironment().getStripCount(), getSVNEnvironment().isIgnoreWhitespace(), true, getSVNEnvironment().isReverseDiff()); } catch (SVNException e) { getSVNEnvironment().handleWarning(e.getErrorMessage(), new SVNErrorCode[] { SVNErrorCode.ENTRY_EXISTS, SVNErrorCode.WC_PATH_NOT_FOUND }, getSVNEnvironment().isQuiet()); } finally { if (!getSVNEnvironment().isQuiet()) { StringBuffer status = new StringBuffer(); printer.printConflictStatus(status); getSVNEnvironment().getOut().print(status); } } }
SVNDiffClient diffClient = clientManager.getDiffClient(); ISVNDiffGenerator diffGenerator = diffClient.getDiffGenerator();
SVNDiffClient diffClient = clientManager.getDiffClient(); ISVNDiffGenerator diffGenerator = diffClient.getDiffGenerator();
SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); final SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer);
SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); final SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer);
SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); final SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer);
target = new SVNPath(""); SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); if (!getSVNEnvironment().isQuiet()) {
SVNDiffClient client = getSVNEnvironment().getClientManager().getDiffClient(); final SVNNotifyPrinter printer = new SVNNotifyPrinter(getSVNEnvironment()); client.setEventHandler(printer);