예제 #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;
        }
예제 #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();
            }
        }
예제 #3
0
 public FormFetch(CGitManager objGitMgr, string szWorkingdir, string LocalBranch)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szWorkingdir); ;
     _bIsRetchRemoteRepo = false;
 }
예제 #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;
        }
예제 #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");
                }
            }
        }
예제 #6
0
 public FormSshProperty(CGitManager objGitMgr, string szGitFetchURl, string szTargetDir)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szGitFetchURL = szGitFetchURl;
     _szTargetDir = szTargetDir;
     _bIsUpLoaded = false;
 }
예제 #7
0
파일: FormPush.cs 프로젝트: nhnchengdu/nGit
 public FormPush(CGitManager objGitMgr, string szWorkingdir, string LocalBranch)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szWorkingdir);
     _szLocalBranch=LocalBranch;
     _bIsUpLoaded = false;
 }
예제 #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;
 }
예제 #9
0
        public FormProperty(CGitManager objGitMgr, string szTargetDir)
        {
            InitializeComponent();
            m_oInforProperty = new SccProviderProperty();

            _szSolutionName = szTargetDir;
            _objGitMgr = objGitMgr;
        }
예제 #10
0
 public void Initialize(CGitManager objGitMgr)
 {
     _objGitMgr = objGitMgr;
     if(_objGitMgr!=null)
     {
         control.Initialize(_objGitMgr);
     }
 }
예제 #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);
 }
예제 #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>();
 }
예제 #13
0
 public FormUnstage(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szSolutionName = szSolutionName;
     _SelectedFileList = FileList;
     _bIsOperSuccess = false;
     _szWorkingDir = CHelpFuntions.GetValidWorkingDir(_szSolutionName);
 }
예제 #14
0
        public TestForm3(string szSolutionName, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;

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

            _szTargetBranch = string.Empty;
            _szWorkingdir = CHelpFuntions.GetValidWorkingDir(szSolutionName);
            _bIsDeleteBranch = false;
        }
예제 #16
0
 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;
 }
예제 #17
0
 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;
 }
예제 #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;
 }
예제 #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;
        }
예제 #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);
         }
     }
 }
예제 #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;
        }
예제 #22
0
 public CGitManagerUI(CGitManager GitManagerObj)
 {
     this._gitManagerObj = GitManagerObj;
 }
예제 #23
0
 public FormClone(CGitManager objGitMgr,string szLocalDir)
 {
     InitializeComponent();
     _objGitMgr = objGitMgr;
     _szLocalDir = szLocalDir;
 }
예제 #24
0
 public CGitManagerCore(CGitManager GitManagerObj)
 {
     this._objGitManager = GitManagerObj;
 }
예제 #25
0
 public void InitGitEnv(string szWorkingDir, CGitManager objGitMgr )
 {
     _szWorkingDir=szWorkingDir;
     _objGitMgr=objGitMgr;
 }
예제 #26
0
 public CGitManagerRepo(CGitManager GitManagerObj)
 {
     this._gitManagerObj = GitManagerObj;
 }
예제 #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();
        }
예제 #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();
            }
        }