Skip to content

Instantly share code, notes, and snippets.

@noorulhaq
noorulhaq / SVNDownloadFile.java
Created March 27, 2017 19:58
This code snippet demonstrates how to download file using SVNKit.
package crossover;
import org.tmatesoft.svn.core.SVNProperties;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
import java.io.ByteArrayOutputStream;
@noorulhaq
noorulhaq / SVNLogCommand.java
Created March 27, 2017 20:13
This gist demonstrate how to mimic log command using SVNKit.
package crossover;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
import java.util.Collection;
@noorulhaq
noorulhaq / SVNShowCommand.java
Created March 27, 2017 20:32
This gist demostrate how you can mimic Git show command using SVNkit.
package crossover;
import org.tmatesoft.svn.core.SVNLogEntryPath;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
import java.util.Iterator;
@noorulhaq
noorulhaq / SVNDiffCommand.java
Created March 27, 2017 21:17
This gist demostrate how we can mimic "svn diff --summarize -r 1:4 https://repo/url" command using SVNKit.
package crossover;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.internal.wc2.ng.SvnDiffGenerator;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc2.SvnDiffSummarize;
import org.tmatesoft.svn.core.wc2.SvnOperationFactory;
import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
@noorulhaq
noorulhaq / SVNFileDiffCommand.java
Created March 27, 2017 21:27
This gist demostrate how "svn diff --summarize -r 1:4 https://repo/file.txt" command can be mimicked using SVNKit.
package crossover;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.internal.wc2.ng.SvnDiffGenerator;
import org.tmatesoft.svn.core.wc.SVNRevision;
import org.tmatesoft.svn.core.wc2.SvnDiff;
import org.tmatesoft.svn.core.wc2.SvnOperationFactory;
import org.tmatesoft.svn.core.wc2.SvnTarget;
import java.io.File;
@noorulhaq
noorulhaq / TracingSampleApplication.java
Last active June 8, 2018 22:39
Zipkin distributed tracing between express.js based aggregator and spring based backends
package com.tracing.sample.tracingsample;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
public class TracingSampleApplication {