Click here to Skip to main content
15,895,772 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I dug around the API a little more, and it looks like I need to do client.Import(path, uri, importArgs);

Can any one help me on this?
Posted

1 solution

Hello Suman,

You can find the API documentation for SharpSVN here[^]. In order to add a file into the repository there are two options.

  1. Import - This option is generally used for the very first time to import the local directory contents into the subversion repository. I generally use it to create the initial project directory structure with standard files. There are 4 variants available in SharpSVN.

    • bool import(String, Uri) - This option returns true if import is successful. The first parameter is the absolute path to the folder to be imported recursively. The second argument is the subversion repository url e.g. "http://svn.foo.com/repository/products/myproject/trunk".
    • bool import(String, Uri, SvnCommitResult) - Use this option if you want to know the actual error when the API returns False.
    • bool import(String, Uri, SvnImportArgs) - Use this option to pass additional arguments. e.g. The log message to be used, disable automatic property settings etc.
    • bool import(String, Uri, SvnImportArgs, SvnCommitResult) - Similar to above but upon failure you can obtain the exact details for the error

  2. Add, Delete & Commit - These are the ones to be used from local working copy to add/delete new/updates files into the remote repository. The Add API will either allow you add all files under a particular path or selectively a single file. Delete API as well allow you to remove a path recursively or a single file. Finally the commit API sends the changes to server, this API takes the root folder path or a collection of file paths.
  3. Please also have a look at this[^] walk through.

    Hope this helps you.
    Regards,
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900