GitUI.FormProcess.AppendOutputLine C# (CSharp) Method

AppendOutputLine() public method

Appends a line of text (CRLF added automatically) both to the logged output (FormStatus.GetOutputString) and to the display console control.
public AppendOutputLine ( string line ) : void
line string
return void
        public void AppendOutputLine(string line)
        {
            // To the internal log (which can be then retrieved as full text from this form)
            OutputLog.AppendLine(line);

            // To the display control
            AddMessageLine(line);
        }

Usage Example

Ejemplo n.º 1
0
        private bool HandlePushOnExit(ref bool isError, FormProcess form)
        {
            if (isError)
            {
                //auto pull only if current branch was rejected
                Regex IsRejected = new Regex(Regex.Escape("! [rejected] ") + ".*" + Regex.Escape(_currentBranch) + ".*" + Regex.Escape(" (non-fast-forward)"), RegexOptions.Compiled);

                if (Settings.AutoPullOnRejected && IsRejected.IsMatch(form.OutputString.ToString()))

                {
                    if (Settings.PullMerge == Settings.PullAction.Fetch)
                    {
                        form.AppendOutputLine(Environment.NewLine + "Can not perform auto pull, when merge option is set to fetch.");
                    }
                    else if (IsRebasingMergeCommit())
                    {
                        form.AppendOutputLine(Environment.NewLine + "Can not perform auto pull, when merge option is set to rebase " + Environment.NewLine
                                              + "and one of the commits that are about to be rebased is a merge.");
                    }
                    else
                    {
                        bool pullCompleted;
                        UICommands.StartPullDialog(this, true, out pullCompleted);
                        if (pullCompleted)
                        {
                            form.Retry();
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
All Usage Examples Of GitUI.FormProcess::AppendOutputLine