DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Related

  • Keep Your Application Secrets Secret
  • How To Validate Names Using Java
  • High-Performance Java Serialization to Different Formats
  • How to Develop Event-Driven Architectures

Trending

  • Ending Microservices Chaos: How Architecture Governance Keeps Your Microservices on Track
  • How to Choose a Server Stack at Product Launch
  • Filtering Java Collections via Annotation-Driven Introspection
  • Leveraging Apache Flink Dashboard for Real-Time Data Processing in AWS Apache Flink Managed Service
  1. DZone
  2. Data Engineering
  3. Databases
  4. SVNKit: Tame Subversion with Java!

SVNKit: Tame Subversion with Java!

By 
Alexander Kitaev user avatar
Alexander Kitaev
·
Feb. 26, 08 · News
Likes (2)
Comment
Save
Tweet
Share
10.8K Views

Join the DZone community and get the full member experience.

Join For Free

SVNKitis an Open Source pure Java Subversion library. SVNKit literally brings Subversion, popular open source version control system, to the Java world.

With SVNKit you can do the following:

All standard Subversion operations:

For instance, the following snipped checks out project from repository:

   File dstPath = new File("c:/svnkit");   SVNURL url = SVNURL.       parseURIEncoded("http://svn.svnkit.com/repos/svnkit/branches/1.1.x/");   SVNClientManager cm = SVNClientManager.newInstance();   SVNUpdateClient uc = cm.getUpdateClient();   uc.doCheckout(url, dstPath, SVNRevision.UNDEFINED, SVNRevision.HEAD, true);

Updates it to the latest revision:

   uc.doUpdate(dstPath, SVNRevision.HEAD, true); 

And finally commits local changes in "www" subdirectory if there are any:

   SVNCommitClient cc = cm.getCommitClient();   cc.doCommit(new File[] {new File(dstPath, "www")}, false, "message", false, true);

SVNKit supports all standard Subversion operations and compatible with the latest version of Subversion.

Access Subversion repository directly:

Some applications will benefit from working with repository directly, without keeping working copy locally. Example below displays list of files in "www" directory.

   SVNURL url = SVNURL.parseURIEncoded("http://svn.svnkit.com/repos/svnkit/branches/1.1.x/");   SVNRepository repos = SVNRepositoryFactory.create(url);   long headRevision = repos.getLatestRevision();   Collection entriesList = repos.getDir("www", headRevision, null, (Collection) null);   for (Iterator entries = entriesList.iterator(); entries.hasNext();) {        SVNDirEntry entry = (SVNDirEntry) entries.next();        System.out.println("entry: " + entry.getName());        System.out.println("last modified at revision: " + entry.getDate() +                                         " by " + entry.getAuthor());   }

Direct repository access API allows to perform operations like update, commit, diff and many other. Additionaly to the performance benefits of the direct access to repository, this API makes it possible to version arbitrary objects or object models within Subevrsion repository, not only files from the file system.

Replace JNI Subversion bindings with SVNKit:

Native Subversion provides Java interface that works with Subversion binaries through JNI. In case you already using it or would like to use as an option, you may also use SVNKit through exactly the same interface. This way you'll let your application dynamically switch between JNI and SVNKit implementation of the same API or let your application work on the platforms where there are no native Subversion binaries. For example:

   // pure Java implementation of the standard Subversion Java interface    SVNClientInterface jniAPI = SVNClientImpl.newInstance();   byte[] contents =         jniAPI.fileContent("http://svn.svnkit.com/repos/svnkit/branches/1.1.x/changelog.txt",                Revision.HEAD); 

SVNKit is widely used in different applications, including IntelliJ IDEA, Eclipse Subversion integrations, SmartSVN, JDeveloper, bug tracking server side applications (e.g. Atlassian JIRA) and repository management and tracking tools (e.g. Atlassian FishEye) and many others.

Where to get more information:

Recently we've released SVNKit version 1.1.6 which is bugfix release. At http://svnkit.com/ you will find more information on that new version and, of course, downloads, documentation, source code example and articles explaining how to use SVNKit. In case of any questions you're welcome at our mailing list, or just contact us at support@svnkit.com

SVNKit is widely used in different applications, including IntelliJ IDEA, Eclipse Subversion integrations, SmartSVN, JDeveloper, bug tracking server side applications (e.g. Atlassian JIRA) and repository management and tracking tools (e.g. Atlassian FishEye) and many others.

With best regards,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!

source control Java (programming language) application Open source Repository (version control) Tame (analytic tool)

Opinions expressed by DZone contributors are their own.

Related

  • Keep Your Application Secrets Secret
  • How To Validate Names Using Java
  • High-Performance Java Serialization to Different Formats
  • How to Develop Event-Driven Architectures

Partner Resources


Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: