Question

I have been trying to Tag a particular folder (on my PC) to an SVN location using SvnClient.

I came to know that Branch / Tag is simply a copy operation in Subversion.

  1. Is it true that copy to a location is like (or the same as) creating Tag?
  2. The SvnClient.Copy command has the following signature:

    public bool Copy(SvnTarget sourceTarget, string toPath)

I am using it as:

    string CILocalPath = System.IO.Path.Combine(NewLabelFolderPath, "CI"); // C:\MyFolder
    string CITagPath = textBoxCI.Text.Replace(textBoxBranchKeyword.Text,textBoxTagKeywork.Text); svn://10.205.10.72/OurFolders

    SvnTarget CITarget = SvnTarget.FromString(CITagPath);
    client.Copy(?,?);

Its very confusing and I dont know first parameter is my local path or remote path.

Am I using it correctly? Please assist me.

EDIT :
I placed C:\MyFolder as first argument and the other as second and it gave me the following error:

This argument is not a valid path. A Uri was specified
Parameter name: toPath

Was it helpful?

Solution

If you want to copy to a url you should client.RemoteCopy(, )

SharpSvn uses a different function for this to avoid requiring authorization setup etc, for copying just local directories.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top