SVN File List – Listing SVN Files in Java


Requirement 1: Given an SVN Repository URL with Username and Password, list all Files inside the directory.

Initialize SVN First by declaring a repostiroy object:

The above method will initialize the repository and call the list of files located on the given path “deploy”. This means all files at: svn://localhost/branches/project/deploy

The above code will re-curse to get all the list of files. We need to do a recursion to exclude the Directories and consider only files. :)

Sample code: here

Download the SVNKIT (Java API for SVN): here
Enjoy!

6 thoughts on “SVN File List – Listing SVN Files in Java

  1. We need to do a recursion to exclude the Directories and consider only files.Great post. I was checking constantly this blog and I am impressed! Extremely helpful information specially the last part I care for such information much. I was seeking this certain information for a long time. Thanks and good luck.

  2. Thanks for the feedback! Glad I could help! :)

    I’m actually doing a initiative project in our company to create a deployment tool to automate the deployment process. I’d post it here after!

    Thanks!

  3. Pingback: JavaPins

  4. I impressed with your blog. I want some more information like how can download entire project from svn repository to local directory using svn kit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s