예제 #1
0
        public void Read()
        {
            // not really elegant, but sufficient as no recovery from an error condition is needed
            try
            {
                string strRevAndRepos = Revision + " " + Repository;
                string strSvnLookPath = TypedConfiguration.Instance.SvnLookPath;
                strSvnLookPath = "\"" + strSvnLookPath + "\"";

                if (log.IsInfoEnabled)
                {
                    log.Info(strSvnLookPath + " info -r " + strRevAndRepos);
                }
                StringCollection infoColl = SilentCmdLineApplication.Execute(strSvnLookPath + " info -r " + strRevAndRepos);
                if (log.IsInfoEnabled)
                {
                    log.Info(strSvnLookPath + " changed -r " + strRevAndRepos);
                }
                StringCollection changeColl = SilentCmdLineApplication.Execute(strSvnLookPath + " changed -r " + strRevAndRepos);

                StringCollection diffColl = null;
                if (TypedConfiguration.Instance.AppendDiffToMail)
                {
                    if (log.IsInfoEnabled)
                    {
                        log.Info(strSvnLookPath + " diff --no-diff-deleted -r " + strRevAndRepos);
                    }
                    diffColl = SilentCmdLineApplication.Execute(strSvnLookPath + " diff --no-diff-deleted -r " + strRevAndRepos);
                }

                _lookInfo = SvnLookOutputParser.Parse(infoColl, changeColl, diffColl);
            }
            catch (Exception e)
            {
                log.Error("Read/Parse failed fatally", e);
            }
        }
        public void Read()
        {
            // not really elegant, but sufficient as no recovery from an error condition is needed
            try
            {
                string strRevAndRepos = Revision + " " + Repository;
                string strSvnLookPath = TypedConfiguration.Instance.SvnLookPath;
                strSvnLookPath = "\"" + strSvnLookPath + "\"";

                if (log.IsInfoEnabled) log.Info(strSvnLookPath + " info -r " + strRevAndRepos);
                StringCollection infoColl = SilentCmdLineApplication.Execute(strSvnLookPath + " info -r " + strRevAndRepos);
                if (log.IsInfoEnabled) log.Info(strSvnLookPath + " changed -r " + strRevAndRepos);
                StringCollection changeColl = SilentCmdLineApplication.Execute(strSvnLookPath + " changed -r " + strRevAndRepos);

                StringCollection diffColl = null;
                if (TypedConfiguration.Instance.AppendDiffToMail)
                {
                    if (log.IsInfoEnabled) log.Info(strSvnLookPath + " diff --no-diff-deleted -r " + strRevAndRepos);
                    diffColl = SilentCmdLineApplication.Execute(strSvnLookPath + " diff --no-diff-deleted -r " + strRevAndRepos);
                }

                _lookInfo = SvnLookOutputParser.Parse(infoColl, changeColl, diffColl);
            }
            catch (Exception e)
            {
                log.Error("Read/Parse failed fatally", e);
            }
        }