예제 #1
0
파일: SvnTask.cs 프로젝트: speier/shake
        private void Execute(RevisionControlTaskCommands command, string path,
            string url = null, string message = null)
        {
            var args = string.Format("{0} {1} {2}",
                command.ToString().ToLower(), url, path)
                .Replace("  ", " "); // remove double-spaces

            if (!string.IsNullOrEmpty(message))
                args += String.Format(" --message \"{0}\"", message);

            if (!string.IsNullOrEmpty(Username))
                args += String.Format(" --username \"{0}\"", Username);

            args += string.Format(" --password \"{0}\"", Password);

            Exec(SvnExe, args);
        }
예제 #2
0
파일: SvnTask.cs 프로젝트: speier/shake
        private bool ValidSnvResult(RevisionControlTaskCommands command, string result)
        {
            if (string.IsNullOrEmpty(result))
                return false;

            switch (command)
            {
                case RevisionControlTaskCommands.Checkout:
                    return result.Contains("Checked out");

                case RevisionControlTaskCommands.Update:
                    return (result.Contains("At revision") || result.Contains("Updated to revision"));

                case RevisionControlTaskCommands.Add:
                    return result[0].Equals('A');

                case RevisionControlTaskCommands.Commit:
                    return result.Contains("Committed");

                default:
                    return false;
            }
        }