예제 #1
0
        public CommitHelper(string LocalCommitPath)
        {
            string CommitPath = LocalCommitPath;
            log = OperLog.instance;

            // 根据路径先分解出修改单
            //E:\xgd\20121030017-综业周边\20121030017-综业周边-高虎-20130705-V1\
            log.WriteLog("递交路径:" + CommitPath);

            if (CommitPath[CommitPath.Length -1] == '\\')
                CommitPath = CommitPath.Substring(0, CommitPath.Length -1);

            int i = CommitPath.LastIndexOf("\\");
            string AmendDir = CommitPath.Substring(i + 1);  // 20121030017-综业周边-高虎-20130705-V1
            i = AmendDir.IndexOf("-");
            string AmendNo = AmendDir.Substring(0, i); // 20121030017
            i = AmendDir.IndexOf('-', i + 1);
            string CommitDir = AmendDir.Substring(0, i);  // 20121030017-综业周边

            i = AmendDir.LastIndexOf("-V");
            Version = int.Parse(AmendDir.Substring(i + 2)); //1

            // Readme 文件名称
            string Readme = "Readme-" + CommitDir + ".txt";

            ap = new AmendPack(AmendNo);

            ap.LocalDir = CommitPath;
            ap.SCMAmendDir = ap.LocalDir;
            if (Version == 1)
                ap.scmtype = ScmType.NewScm;
            else
                ap.scmtype = ScmType.BugScm;

            pr = new PackerReadMe();
            pr.ProcessComs(ap);
            pr.ProcessMods(ap);
            pr.ProcessSAWPath(ap);

            // 全部修改
            #region
            // 输出下处理结果
            foreach (CommitCom c in ap.ComComms)
            {
                log.WriteFileLog("名称:" + c.cname + " "
                    + "状态:" + Enum.GetName(typeof(ComStatus), c.cstatus) + " "
                    + "版本:" + c.cver + " "
                    + "路径:" + c.path);
            }

            //log.WriteFileLog("[配置库文件]");
            foreach (SAWFile s in ap.SAWFiles)
            {
                log.WriteFileLog("路径:" + s.Path + " "
                    + "本地路径:" + s.LocalPath + " "
                    + "SvnUri:" + s.UriPath + " "
                    + "文件状态:" + Enum.GetName(typeof(FileStatus), s.fstatus));
            }
            #endregion
        }
예제 #2
0
파일: SvnPort.cs 프로젝트: radtek/wscope
 public SvnPort(string name, string server)
 {
     Name = name;
     Server = server;
     // 要发布app.config,否则不能启用混合程序集
     client = new SvnClient();
     log = OperLog.instance;
 }
예제 #3
0
파일: MAConf.cs 프로젝트: radtek/wscope
 public BaseConf()
 {
     log = OperLog.instance;
     Users = new List<DBUser>();
     CommitPublic = new List<String>();
     detail = null;
 }
예제 #4
0
파일: MAConf.cs 프로젝트: radtek/wscope
 private MAConf()
 {
     log = OperLog.instance;
     Configs = new MAConfigs();
     LoadConf();
 }