Exemplo n.º 1
0
 //receive data
 protected override void CallBackGitProcessReceiveData(object sender, DataReceivedEventArgs e)
 {
     Trace.WriteLine(String.Format("\n--------------------Receive----------------------"));
     if(_objGitMgr._objGitMgrCore.m_enCurrAsyncOperType==AsyncOperaType.ASYNC_GET_ALL_COMMITS)
     {
         string[] ArrayInfo = _objGitMgr._objGitMgrCore.ParseCommtItemInfo(e.Data);
         if (ArrayInfo != null && ArrayInfo.Length == 10)
         {
             CommiteInfoItem Item = new CommiteInfoItem();
             Item.szSelfSHA = ArrayInfo[0];
             Item.szParentSHA = ArrayInfo[1];
             Item.szTreeSHA = ArrayInfo[2];
             Item.szAutrhorName = ArrayInfo[3];
             Item.szAutrhorEmail = ArrayInfo[4];
             Item.szAutrhorDate = ArrayInfo[5];
             Item.szCommitName = ArrayInfo[6];
             Item.szCommitDate = ArrayInfo[7];
             Item.szCommitEncoding = ArrayInfo[8];
             Item.szCommitMessage = ArrayInfo[9];
             m_oGitRepository.m_mapTempAllCommites.Add(ArrayInfo[0], Item);
         }
     }
 }
Exemplo n.º 2
0
        public void RenewChildInfoForCommits()
        {
            char[] cSplit=new char[] {'\0', '\t', ' '};

            List<string> TempList = new List<string>();
            TempList.AddRange(_mapAllCommites.Keys);
            foreach (string szKey in TempList)
            {
                //add child informaiton
                string[] ResArray;
                ResArray =  _mapAllCommites[szKey].szParentSHA.Split(cSplit, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < ResArray.Length; i++)
                {
                    CommiteInfoItem Item = new CommiteInfoItem();
                    if (_mapAllCommites.ContainsKey(ResArray[i]))
                    {
                        Item = _mapAllCommites[ResArray[i]];
                        Item.szChildSHA += " " + szKey;
                        _mapAllCommites[ResArray[i]] = Item;
                    }
                    else
                    {
                        Debug.Assert(false);
                    }
                }

            }
        }