예제 #1
0
        private static bool ProcessParameters(params string[] args)
        {
            const int CustomParamStartIndex = 3;

            if (args.Length < CustomParamStartIndex + 1)
            {
                return(true);
            }

            for (var i = CustomParamStartIndex; i < args.Length; i++)
            {
                // get custom SVN binary folder from command line
                if (args[i].StartsWith(SvnBinParamKey, StringComparison.InvariantCultureIgnoreCase) && i + 1 < args.Length)
                {
                    // the param indicates that the next argument contains the actual value
                    var svnbin = args[i + 1];
                    if (!Directory.Exists(svnbin))
                    {
                        Environment.ExitCode = 1;
                        log.Error($"The specified svn binary folder '{svnbin}' doesn't exist!");
                        return(false);
                    }

                    SvnLook.SetSvnBinFolder(svnbin);
                }
            }

            return(true);
        }
예제 #2
0
 private static IRepoChangeInfo GetPostCommitRepoChangeInfo(string repositoryPath, long revision)
 {
     return(SvnLook.Revision(HookType.PostCommit, repositoryPath, revision));
 }
예제 #3
0
 private static IRepoChangeInfo GetPreCommitRepoChangeInfo(string repositoryPath, string transactionName)
 {
     return(SvnLook.Transaction(HookType.PreCommit, repositoryPath, transactionName));
 }