private void okButton_Click(object sender, EventArgs e) { if (localBranchCheckBox.Checked || remoteBranchCheckBox.Checked || pushCheckBox.Checked) { okButton.Enabled = false; var process = ProcessHelper.StartProcessGui(_dte, _envHelper, "cmd.exe", $"/c cd \"{_envHelper.GetSolutionDir()}\" && " + GitHelper.GetSshSetup(_envHelper) + "echo. && " + (pushCheckBox.Checked ? _pushCommand : "echo.") + FormatCliCommand($"branch -d {_branchName}") + (remoteBranchCheckBox.Checked ? FormatCliCommand($"push origin --delete {_branchName}", false) : "echo."), string.Empty, string.Empty, this ); okButton.Click -= okButton_Click; okButton.Click += OkButton_Click_Close; } else { OkButton_Click_Close(null, null); } }
public void SolutionEvents_Opened() { EnvHelper.GetTortoiseGitProc(); EnvHelper.GetGit(); EnvHelper.GetSolutionDir(_dte); EnvHelper.GetGitConfig(); EnvHelper.GetBranchName(); EnvHelper.GetStash(); }
private void ShowChangesCommand(object sender, EventArgs e) { PreCommand(); ProcessHelper.StartTortoiseGitProc(_envHelper, $"/command:repostatus /path:\"{_envHelper.GetSolutionDir()}\" /closeonend:{_generalOptions.CloseOnEnd}"); }
private void SvnDCommitCommand(object sender, EventArgs e) { FileHelper.SaveAllFiles(_dte); ProcessHelper.StartTortoiseGitProc(_envHelper, $"/command:svndcommit /path:\"{_envHelper.GetSolutionDir()}\" /closeonend:{_options.CloseOnEnd}"); }
private void InitCommand(object sender, EventArgs e) { if (string.IsNullOrEmpty(_envHelper.GetSolutionDir())) { return; } var flowDialog = new FlowDialog(); if (flowDialog.ShowDialog() != DialogResult.OK) { return; } var versionTag = string.IsNullOrEmpty(flowDialog.GitConfig.TagPrefix) ? "\"\"" : flowDialog.GitConfig.TagPrefix; /* 1. Add GitFlow config options * 2. Checkout develop branch (create if it doesn't exist, reset if it does) * 3. Push develop branch */ var process = ProcessHelper.StartProcessGui(_dte, _envHelper, "cmd.exe", $"/c cd \"{_envHelper.GetSolutionDir()}\" && " + GitHelper.GetSshSetup(_envHelper) + FormatCliCommand($"config --add gitflow.branch.master {flowDialog.GitConfig.MasterBranch}") + FormatCliCommand($"config --add gitflow.branch.develop {flowDialog.GitConfig.DevelopBranch}") + FormatCliCommand($"config --add gitflow.prefix.feature {flowDialog.GitConfig.FeaturePrefix}") + FormatCliCommand($"config --add gitflow.prefix.release {flowDialog.GitConfig.ReleasePrefix}") + FormatCliCommand($"config --add gitflow.prefix.hotfix {flowDialog.GitConfig.HotfixPrefix}") + FormatCliCommand($"config --add gitflow.prefix.versiontag {versionTag}") + (GitHelper.RemoteBranchExists(_envHelper, flowDialog.GitConfig.DevelopBranch) ? "echo." : FormatCliCommand($"checkout -b {flowDialog.GitConfig.DevelopBranch}", false)), "Initializing GitFlow" ); process.WaitForExit(); _envHelper.ClearCache(CacheKeyEnum.GitConfig); }