How can I use SharpSVN to programmatically add a folder to an ignore list?
EDIT: Trying:
That's what I tried
svnClient.GetProperty(new SvnUriTarget("svn://svn.foo.com/" + DatabaseName + "/"), SvnPropertyNames.SvnIgnore, out ignores);
ignores += " Artifacts";
var args = new SvnSetPropertyArgs() { BaseRevision = ???, LogMessage = "update ignore list" };
svnClient.SetProperty(new Uri("svn://svn.foo.com/" + DatabaseName + "/"), SvnPropertyNames.SvnIgnore, ignores, args);
But I donβt know how to get BaseRevision (I can get it manually, and it works, but all the GetProperty combinations that I tried seem to not give me.)
SOLUTION: based on Bert answer
SvnGetPropertyArgs getArgs = new SvnGetPropertyArgs(){};
string ignores = "Artifacts";
string result;
if(svnClient.GetProperty(new SvnUriTarget("svn://svn.foo.com/" + ProjectName + "/trunk/"), SvnPropertyNames.SvnIgnore,out result))
{
ignores = result + " Artifacts";
}
svnClient.SetProperty(UncPath.TrimEnd('\\'), SvnPropertyNames.SvnIgnore, ignores);
SvnCommit(svnClient);
source
share