Ejemplo n.º 1
0
        public ActionResult GetSvnLog(SvnDetails svnDetails, string TrunckPath, string BranchPath)
        {
            svnDetails.BranchPath = BranchPath;
            svnDetails.TrunckPath = TrunckPath;

            var Log = new Svn(mSvnExecutablePath, svnDetails.TrunckPath, svnDetails.BranchPath, svnDetails.SvnUser, svnDetails.SvnPassword);
            var AllChanges = new List<Svn.LogEntry>();

            try
            {
                AllChanges = Log.GetChanges();
            }
            catch (SvnProcess.SvnException ex)
            {
                foreach (var error in ex.SvnError)
                    ModelState.AddModelError("", error);
                ModelState.AddModelError("", ex.Command);
            }

            //Add each log to the class we are going to pass between sessions so we can keep a list of all the posibile revisions (dont want to rely on the client supplying it)
            svnDetails.Changes.Clear();
            foreach (var Change in AllChanges)
                svnDetails.Changes.Add(Change);

            return PartialView("ViewUserControl", svnDetails);
        }
Ejemplo n.º 2
0
        public ActionResult GetSvnLog(SvnDetails svnDetails, string TrunckPath, string BranchPath)
        {
            svnDetails.BranchPath = BranchPath;
            svnDetails.TrunckPath = TrunckPath;

            var Log        = new Svn(mSvnExecutablePath, svnDetails.TrunckPath, svnDetails.BranchPath, svnDetails.SvnUser, svnDetails.SvnPassword);
            var AllChanges = new List <Svn.LogEntry>();

            try
            {
                AllChanges = Log.GetChanges();
            }
            catch (SvnProcess.SvnException ex)
            {
                foreach (var error in ex.SvnError)
                {
                    ModelState.AddModelError("", error);
                }
                ModelState.AddModelError("", ex.Command);
            }

            //Add each log to the class we are going to pass between sessions so we can keep a list of all the posibile revisions (dont want to rely on the client supplying it)
            svnDetails.Changes.Clear();
            foreach (var Change in AllChanges)
            {
                svnDetails.Changes.Add(Change);
            }

            return(PartialView("ViewUserControl", svnDetails));
        }