Connecting to SVN repository using DotSVN
In this post I would like to highlight how easy it is to connect to SVN repository using DotSVN.
Steps to follow:
1) Create an instance of
ISVNRepository using the SVNRepositoryFactory
2) Now that we have a connection to the repository, we can get contents using the GetDir method.
The SVNDirEntry representation of a versioned directory entry, It contains
- The Entry name
- Entry kind (is it a file or directory).
- File size (in case an entry is a file)
- The last changed revision
- The date when the entry was last changed
- The name of the author who last changed the entry
- The commit log message for the last changed revision.
3) Now we can iterate through the SVNDirEntry collection.
And that is it. We can also call other methods in the repository like










Comments
Wow, nice library, this will come in very handy when writing tools against our repository, thanks!
Posted by: David Cumps | September 22, 2007 10:27 PM
Thanks.
Let me know if you face any issues. I will be glad to help.
-George
Posted by: George Chiramattel
|
September 23, 2007 6:06 PM
I downloaded the dotsvn open source. It is a very handy tool.
but the question is that how do i connect it with my SVN? Can you please write whole process that once we download what to do next, how can we connect this whole project with SVN and get the document from the SVN?
Thank you.
Posted by: shruti | October 3, 2007 10:07 PM
Please take a look at the following article at Code Project.
http://www.codeproject.com/useritems/subversion_using_dotsvn.asp
Hope this helps.
Posted by: George Chiramattel
|
October 7, 2007 12:35 AM
Hi all
if i want the use the DotSVN API, which dll should i add to my project and how to add?
thanks
weifang
Posted by: weifang | October 29, 2007 3:05 PM
It depends on which layer you would want to connect to...
To connect to the server layer (to the native SVN repository - FSFS) you should use
dotsvn.server.dll
This has a dependency on dotsvn.common.dll
The dotsvn.client.dll is used for working-copy management - but this functionality is not implemented.
So in short, right now you should use
- dotsvn.server.dll
- dotsvn.common.dll
Posted by: George Chiramattel
|
November 1, 2007 6:03 PM
Hi Mr. Chiramattel, i'm using DotSVN to connect to my local SVN, and i used GetFile method from FSRepository class but got an error.
After a debug, i found that if i use the SVNDirEntry.URL property to GetFile(...) as my path, this has been assign with ToLower(), so, this is the fix that i made.
In SVNURL Class on line 119 i took ToLower out from the line and it worked fine.
Hope it helps for your excellent DotSVN project.
Posted by: Jorge Baroudi | November 7, 2007 8:24 PM
hi, I want to send a single file that contains whole files and directories to the server, and I wish that it search the files that have change. Can I do it with your library? Thanks in advance
Posted by: beiang | December 5, 2007 5:59 AM