Exemple #1
0
        public void CommitGit()
        {
            if (this.Solution == null)
            {
                return;
            }
            GitService.UpdateStatus(this.Solution, true);
            if (!this.Solution.HasChangesNotCommited)
            {
                MessageBox.ErrorQuery(50, 7, "Commit", "There is no repositories to commit", "Ok");
                return;
            }
            string message = WindowManager.ShowDialogText("Commit", "Message");

            if (string.IsNullOrEmpty(message))
            {
                return;
            }
            if (this.WorkItem != null)
            {
                message = string.Format("#{0} {1}", this.WorkItem.Code, message);
            }
            WindowManager.ShowLog();
            GitService.Commit(this.Solution, message);
            GitService.UpdateStatus(this.Solution, true);
            WindowManager.CloseLog();
            this.RefreshUI();
        }