2

Is there a way to recursively svn delete files in a working copy that have been moved/deleted outside of SVN with SharpSVN?

I have a task that runs periodically to commit a directory exactly as it is, but I need files that have been removed to be marked as deleted instead of missing.

jocull
  • 20,008
  • 22
  • 105
  • 149

1 Answers1

3

You can probably handle this scenario like:

using (SvnClient c1 = new SvnClient())
using (SvnClient c2 = new SvnClient())
{
    c1.Status(@"F:\working-copy",
        delegate(object sender, SvnStatusEventArgs e)
        {
           if (e.Status == SvnStatus.Missing)
              c2.Delete(e.FullPath);
        });
}

(Untested code. Feel free to fix typos)

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73