public HistorySwitchVersion SetLastversion(string scenario_id, string ticket = "", string topic_id = "")
        {
            HistorySwitchVersion model = new HistorySwitchVersion();

            string folder = ApiHelper.FindFolderById(scenario_id, PathHelper.GetRepoPath());

            if (folder == null)
            {
                model.errors = ApiHelper.JsonError(400, new string[] { "scenario not exist" });
                return(model);
            }
            ;

            string topicInfoFile = string.Empty;

            if (!string.IsNullOrEmpty(topic_id))
            {
                List <TopicModel> topics = ApiHelper.GetTopicsOrigin(scenario_id);
                foreach (TopicModel t in topics)
                {
                    if (t.index.ToString() == topic_id)
                    {
                        folder        = t.vmpPath;
                        topicInfoFile = t.infoPath;
                        break;
                    }
                }
            }

            SVNManager.RevertToLastVersion("./", (res) =>
            {
                model.message = res;
            });
            return(model);
        }
        public HistorySwitchVersion SetVersionRepo(string version_number, string ticket = "")
        {
            HistorySwitchVersion model = new HistorySwitchVersion();
            int version = int.Parse(version_number);

            SVNManager.RevertToRevision(version, "./", (res) =>
            {
                model.current_version = version;
                model.message         = res;
            });
            return(model);
        }