

The output of the method is provided by the return value and the third argument of the method. The second argument, revision, is the number corresponding to the revision that has to be fetched. This path could either be relative to the repository's location, or absolute to the root (starts with "/"). The inputs for this method are specified in the first two arguments: the first argument, path, is the path to the directory whose contents are to be read. A directory entry could be a directory or a file on the file system. The information of each directory entry is represented by a single SVNDirEntry object. This method fetches the contents and properties of a directory located at the specified path in a particular revision. Public override ICollection GetDir( string path,
#Subversion net code#
The following code snippet demonstrates this: The process of instantiating a repository class is encapsulated in a factory class. In DotSVN, the repository access layer is abstracted in the ISVNRepository interface and the SVNRepository class. So, in order to connect to a repository on the local file system, we have to first instantiate an FSRepository, giving a complete local path to the repository. svn:// A custom protocol proprietary to SubversionĭotSVN currently supports repository access using the file:// protocol, which is implemented in the FSRepository class.or To access a repository over the Web (using the WebDav protocol).file:// To access a repository located on the local machine.

A Subversion repository can be accessed by any of the following three protocols: In order to open a repository, we have to specify how we are going to access the repository. Let us understand these steps one by one.
#Subversion net how to#
How to use the DotSVN APIs?ĭotSVN APIs are very simple to use.
#Subversion net windows#
It displays the contents of an FSFS repository in a hierarchical fashion, displaying the Windows file type icon beside each directory or file. This sample application is a WinForms based repository browser, very similar to the repository browser of Tortoise SVN. This release of DotSVN also includes a sample application which demonstrates the usage of the DotSVN APIs. It can read the directory structure, properties of a revision, and the contents of individual files from the repository. Recently, the DotSVN team released the first iteration of the DotSVN library, which supports reading the contents of an FSFS repository hosted in Subversion.

DotSVN is developed as an Open Source project hosted on Google Code. NET developers to connect to an SVN repository and manipulate it. NET, without using any of the Subversion libraries. It implements the Subversion repository access layer completely in. DotSVN accesses a Subversion repository at the repository level itself (instead of at the client side/working copy). Also, the Subversion file system uses transactions to keep the changes atomic - All or None. In Subversion, files are stored as links to the previous change hence, the Subversion repository is very compact. The Subversion file system is a three-dimensional file system, two dimensions being the directory view and the third dimension being the revision. The following diagram taken from the SVN book depicts the Subversion architecture (courtesy of the SVN book).
