Example #1
0
        public FormInitRepo(string szRepoDir, CGitManager objGitMgr)
        {
            InitializeComponent();
            _szSolutionRepoDir = szRepoDir;
            _objGitMgr = objGitMgr;

            if(null==szRepoDir)
            {
                m_rbSolutionDir.Enabled = false;
                m_rbSolutionDir.Checked = false;
                m_rbSelecteDir. Checked  = true;

                m_btnBrowse.Enabled = true;
                m_Directory.Enabled = true;

            }
            else
            {
                m_rbSolutionDir.Enabled = true;
                m_rbSolutionDir.Checked = true;
                m_rbSelecteDir.Checked = false;
                m_btnBrowse.Enabled = false;
                m_Directory.Enabled = false;
            }

               // if (!Settings.Module.ValidWorkingDir())
               //     Directory.Text = Settings.WorkingDir;
        }
Example #2
0
        public Ignore(string szSolutionName, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;
            _IgnoreFileList = new List<string>() ;
            _UntrackedFileList = new List<string>();

            string szWorkingDir = CHelpFuntions.GetValidWorkingDir(szSolutionName);
            if (szWorkingDir.Equals(string.Empty))
            {
                return;
            }

            string szFilename = szWorkingDir + ".gitignore";
            if (File.Exists(szFilename))
            {
                m_rtxContent.Text = File.ReadAllText(szFilename);
            }
            else
            {
                FileStream myFs = new FileStream(szFilename, FileMode.Create);
                StreamWriter mySw = new StreamWriter(myFs);
                mySw.Write("");
                mySw.Close();
                myFs.Close();
            }
        }
Example #3
0
 public FormFetch(CGitManager objGitMgr, string szWorkingdir, string LocalBranch)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szWorkingdir); ;
     _bIsRetchRemoteRepo = false;
 }
Example #4
0
        public FormDsicard(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;
            _lstAllFiles = FileList;

            _hashAllFiles = new Hashtable();
            foreach (string szItem in FileList)
            {
                FileSccStatus status = _objGitMgr.GetFileStatus(szItem);
                if (status==FileSccStatus.ST_NEW_STAGED||status==FileSccStatus.ST_STAGE_MODIFIED)
                {
                    _hashAllFiles.Add(szItem,"Index");
                }
                else if(status==FileSccStatus.ST_CHECKIN_MODIFIED)
                {
                    _hashAllFiles.Add(szItem,"Repos");
                }
                else if (status==FileSccStatus.ST_MODIFY_STAGED_MODIFY||status==FileSccStatus.ST_MODIFY_STAGED)
                {
                    _hashAllFiles.Add(szItem, "Both");
                }
                else
                {
                    continue;
                }
            }
            if (_hashAllFiles.Count <= 0)
                bUsShortFileName = true;
        }
Example #5
0
        public FormDelete(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;
            _lstAllFiles = FileList;
            _hashAllFiles = new Hashtable();
            foreach (string szItem in FileList)
            {

                FileSccStatus status = _objGitMgr.GetFileStatus(szItem);
                if (status == FileSccStatus.ST_NOT_CONTROLLED||status == FileSccStatus.ST_IGNORED)
                {
                    _hashAllFiles.Add(szItem, "Untracked");
                }
                else if (status == FileSccStatus.ST_RENMAE||status == FileSccStatus.ST_CONFLICT)
                {
                    _hashAllFiles.Add(szItem, "Unkonown");    //this satus need to decide later      --by fengzheng
                }
                else if (status == FileSccStatus.ST_DELETE||status == FileSccStatus.ST_NULL)
                {
                    continue;
                }
                else
                {
                   _hashAllFiles.Add(szItem, "Tracked");
                }
            }
        }
Example #6
0
 public FormSshProperty(CGitManager objGitMgr, string szGitFetchURl, string szTargetDir)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szGitFetchURL = szGitFetchURl;
     _szTargetDir = szTargetDir;
     _bIsUpLoaded = false;
 }
Example #7
0
 public FormPush(CGitManager objGitMgr, string szWorkingdir, string LocalBranch)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szWorkingdir);
     _szLocalBranch=LocalBranch;
     _bIsUpLoaded = false;
 }
Example #8
0
 public Form_Remote_AddRemote(CRemoteControl Parent)
 {
     InitializeComponent();
     m_Parent = Parent as CRemoteControl;
     _objGitMgr=m_Parent.m_objGitMgr;
     _szWorkingdir = m_Parent.m_szWorkingDir;
     _bIsAddRemoteRepo = false;
 }
Example #9
0
        public FormProperty(CGitManager objGitMgr, string szTargetDir)
        {
            InitializeComponent();
            m_oInforProperty = new SccProviderProperty();

            _szSolutionName = szTargetDir;
            _objGitMgr = objGitMgr;
        }
Example #10
0
 public void Initialize(CGitManager objGitMgr)
 {
     _objGitMgr = objGitMgr;
     if(_objGitMgr!=null)
     {
         control.Initialize(_objGitMgr);
     }
 }
Example #11
0
 public FormStash(string szSolutionName, CGitManager objGitMgr)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szSolutionName = szSolutionName;
     //string szWorkingDir = CHelpFuntions.GetValidWorkingDir(_szSolutionName);
     //string szWorkingDir = CHelpFuntions.GetValidWorkingDir(_szSolutionName);
     //string[] szResArray = _objGitMgr._objGitMgrCore.GetAllSUntrackedFiles(szWorkingDir);
 }
Example #12
0
 public FormBlame(String szTargetFile, string szCommitSHA, string szSolutionName, CGitManager objGitMgr)
 {
     InitializeComponent();
     _szFile = szTargetFile;
     _szSHA = szCommitSHA;
     _objGitMgr = objGitMgr;
     _szSolutionName = szSolutionName;
     _mapBlameInfo = new Dictionary<int, string>();
 }
Example #13
0
 public FormUnstage(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szSolutionName = szSolutionName;
     _SelectedFileList = FileList;
     _bIsOperSuccess = false;
     _szWorkingDir = CHelpFuntions.GetValidWorkingDir(_szSolutionName);
 }
Example #14
0
        public TestForm3(string szSolutionName, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;

            string szWorkingDir = CHelpFuntions.GetValidWorkingDir(_szSolutionName);
            this.m_RemoteControl.InitGitEnv(szWorkingDir, _objGitMgr);
        }
Example #15
0
        public FormSwitchBranch(string szSolutionName, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;

            _szTargetBranch = string.Empty;
            _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szSolutionName);
            _bIsDeleteBranch = false;
        }
 public Form_Remote_DelRemoteBranch(CRemoteControl Parent)
 {
     InitializeComponent();
     m_Parent = Parent as CRemoteControl;
     _objGitMgr = m_Parent.m_objGitMgr;
     _szWorkingdir = m_Parent.m_szWorkingDir;
     _bIsUpLoaded = false;
     _szTargetRemoteRepo = string.Empty;
 }
 public Form_Remote_AddTracking(CRemoteControl Parent)
 {
     InitializeComponent();
     m_Parent = Parent as CRemoteControl;
     _objGitMgr = m_Parent.m_objGitMgr;
     _szWorkingdir = m_Parent.m_szWorkingDir;
     _bIsRemoveRemoteRepo = false;
     _szTargetRemoteRepo = string.Empty;
     _szTargetRemoteBranch = string.Empty;
 }
Example #18
0
 public Form_Remote_EditRemote(CRemoteControl ParentDlg)
 {
     InitializeComponent();
     m_Parent = ParentDlg as CRemoteControl;
     _objGitMgr = m_Parent.m_objGitMgr;
     _szWorkingdir = m_Parent.m_szWorkingDir;
     _bIsEditRemoteRepo = false;
     _szTargetRemoteRepo = string.Empty;
     _szOldFetchURL= string.Empty;
     _szOldPushURL= string.Empty;
 }
Example #19
0
        public FormConflict(CGitManager objGitMgr, string szWorkingdir, string LocalBranch)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szWorkingdir);
            _szLocalBranch=LocalBranch;
            _bIsPulled = false;
            _szOriginBranch = LocalBranch;

            ResolveProcessAbort = new EventHandler(ManualResolveProcessExit);
            syncResolveContext = SynchronizationContext.Current;
        }
Example #20
0
 public FormCommit(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szSolutionName = szSolutionName;
     _FileList = FileList;
     if (FileList == null || FileList.Count<=0)
     {
         if(_objGitMgr!=null && string.IsNullOrEmpty(szSolutionName)==false)
         {
             _FileList = _objGitMgr._objGitMgrCore.GetAllIndexChange(szSolutionName);
         }
     }
 }
Example #21
0
        public Form_Remote_PullBranch(CRemoteControl Parent)
        {
            InitializeComponent();
            m_Parent = Parent as CRemoteControl;
            _objGitMgr = m_Parent.m_objGitMgr;
            _szWorkingdir = m_Parent.m_szWorkingDir;
            _bIsPulled = false;

            _szTargetRemoteRepo = string.Empty;
            _szRemoteBranch = string.Empty;
            _szLocalBranch = string.Empty;
            _szRemoteURL = string.Empty;

            _bIsStashed = false;
            _bIsSwitchBranch = false;
            _szOriginBranch = Parent.m_oRemoteInfo.m_CurentBranch;

            ResolveProcessAbort = new EventHandler(ManualResolveProcessExit);
            syncResolveContext = SynchronizationContext.Current;
        }
Example #22
0
 public CGitManagerUI(CGitManager GitManagerObj)
 {
     this._gitManagerObj = GitManagerObj;
 }
Example #23
0
 public FormClone(CGitManager objGitMgr,string szLocalDir)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szLocalDir = szLocalDir;
 }
Example #24
0
 public CGitManagerCore(CGitManager GitManagerObj)
 {
     this._objGitManager = GitManagerObj;
 }
Example #25
0
 public void InitGitEnv(string szWorkingDir, CGitManager objGitMgr )
 {
     _szWorkingDir=szWorkingDir;
     _objGitMgr=objGitMgr;
 }
Example #26
0
 public CGitManagerRepo(CGitManager GitManagerObj)
 {
     this._gitManagerObj = GitManagerObj;
 }
Example #27
0
        private void m_btnCancel_Click(object sender, EventArgs e)
        {
            if (_bIsUpLoaded)
                this.DialogResult = DialogResult.OK;

             _objGitMgr = null;
             _szGitFetchURL = null;
             _szTargetDir = null;
            this.Close();
        }
Example #28
0
 public FormClone(CGitManager objGitMgr)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
 }
        public void Initialize(CGitManager objGitMgr)
        {
            if (_objGitMgr == null)
                _objGitMgr = objGitMgr;

            if (_objGitMgr != null)
            {
                m_oInforProperty.GitApplication = CGitSourceConfig.GetGitExRegValue();
                m_oInforProperty.GitInfomation = _objGitMgr._objGitMgrCore.GetVersion();
                m_oInforProperty.UserName = _objGitMgr._objGitMgrCore.GetConfigInfo("user.name", null);
                m_oInforProperty.UserEmail = _objGitMgr._objGitMgrCore.GetConfigInfo("user.email", null);

                string szMergeTool = objGitMgr._objGitMgrCore.GetConfigInfo("merge.tool", null);
                if (string.IsNullOrEmpty(szMergeTool) == false)
                {
                    string szMereItem = string.Format("mergetool.{0}.path", szMergeTool);
                    m_oInforProperty.MergeTool = _objGitMgr._objGitMgrCore.GetConfigInfo(szMereItem, null);
                }

                string szDiffTool = objGitMgr._objGitMgrCore.GetConfigInfo("diff.guitool", null);
                if (string.IsNullOrEmpty(szDiffTool) == false)
                {
                    string szDiffItem = string.Format("difftool.{0}.path", szDiffTool);
                    m_oInforProperty.CompareTool = _objGitMgr._objGitMgrCore.GetConfigInfo(szDiffItem, null);
                }
                propertyGrid1.Refresh();
            }
        }