How can we clean up unversioned files

221 Views Asked by At

I am using SharpSvn to work with svn in my C# project. At the moment, I want to clean up everything( including change/unversioned files ) before checkout news from svn.

I already call SvnClient.Revert() and SvnClient.Cleanup(), but it's seem that unversioned files are not cleaned up.

        try
        {
            // try to revert first because if we modify the SVN directory
            SvnClient.CleanUp(targetDir);
            SvnClient.Revert(targetDir);
        }
        catch (Exception e)
        {
            LogHelper.Warn<SvnService>(StringHelper.LogFormat(LogMessage.SvnRevertFailed, targetDir));
        }

        try
        {
            return SvnClient.CheckOut(new Uri(sourceUrl), targetDir);
        }

Did I missed something?

Any help is highly appreciate!

0

There are 0 best solutions below