Builder.Common.BuildStepSubversion.Run C# (CSharp) Method

Run() public method

public Run ( ) : void
return void
        public override void Run()
        {
            string sDirectory = ExpandMacros(m_sDirectory);

            string sCommand = "";
            switch (m_eAction)
            {
                case SVNAction.SVNRevert:
                  m_oBuilder.Log("Reverting " + sDirectory + "...\r\n", true);
                    sCommand = "revert -R " + sDirectory;
                    break;
                case SVNAction.SVNUpdate:
                    m_oBuilder.Log("Updating " + sDirectory + "...\r\n", true);
                    sCommand = "update "+ sDirectory;
                    break;
                default:
                    throw new Exception("Failed. Unknown action.");
            }

            ProcessLauncher launcher = new ProcessLauncher();
            launcher.Output += new ProcessLauncher.OutputDelegate(launcher_Output);
            string output;
            launcher.LaunchProcess(ExpandMacros(m_oBuilder.ParameterSubversionPath), ExpandMacros(sCommand), out output);

            if (output.IndexOf("svn help cleanup") > 0)
                throw new Exception("Failed");
        }