public static async Task <bool> SubmoduleUpdate(String path)
        {
            String  repo = Git.GetBaseRepoDirectoryOrError(path);
            Process p    = await TortoiseGitCommand($"/command:subupdate /path:\"{repo}\" /bkpath:\"{repo}\"", repo);

            return(p.ExitCode == 0);
        }
        public static async Task <bool> Sync(String path)
        {
            String  repo = Git.GetBaseRepoDirectoryOrError(path);
            Process p    = await PathCommand("sync", repo);

            return(p.ExitCode == 0);
        }
        public static async Task <bool> FastSubmoduleUpdate(String path)
        {
            String repo = Git.GetBaseRepoDirectoryOrError(path);
            FastSubmoduleUpdateDialog dialog = new FastSubmoduleUpdateDialog(repo);

            dialog.Show();
            await dialog.WaitForClose();

            return(dialog.DialogResult == DialogResult.OK);
        }
Example #4
0
        private async void OpenWithReferencesRepoTabMenuItem_Click(object?sender, EventArgs e)
        {
            TabControllerTag tag  = LogTabs.SelectedTab !.Controller();
            String           repo = Git.GetBaseRepoDirectoryOrError(tag.RepoItem);

            using ReferencesDialog dialog = new ReferencesDialog(repo);
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                await OpenLog(tag.RepoItem, dialog.SelectedReferences);
            }
        }
Example #5
0
        private void BackgroundFasterFetch_Click(object?sender, EventArgs e)
        {
            TabControllerTag?controller = this.LogTabs.SelectedTab?.Controller();

            if (controller != null)
            {
                if (controller.BackgroundFasterFetchDialog?.Completed == true)
                {
                    controller.BackgroundFasterFetchDialog.Close();
                    controller.BackgroundFasterFetchDialog = null;
                }

                if (controller.BackgroundFasterFetchDialog != null)
                {
                    return;
                }

                String repo = Git.GetBaseRepoDirectoryOrError(controller.RepoItem);

                ProgressDialog dialog = FastFetchDialog.PrepareBackgroundFasterFetch(repo);
                controller.BackgroundFasterFetchDialog = dialog;

                dialog.ProgressCompleted += delegate(object?sender2, EventArgs e2)
                {
                    if (!controller.Process.HasExited)
                    {
                        Native.SendKeyDown(controller.Process.MainWindowHandle, Keys.F5);
                    }

                    if (!dialog.Visible)
                    {
                        dialog.Close();
                    }
                };

                dialog.FormClosed += delegate(object?sender2, FormClosedEventArgs e2)
                {
                    controller.BackgroundFasterFetchDialog = null;

                    UpdateToolStripFasterFetch();
                };

                dialog.ProgressChanged   += BackgroundFasterFetchDialog_ProgressChanged;
                dialog.ProgressCompleted += BackgroundFasterFetchDialog_ProgressChanged;

                dialog.DoProgress();

                UpdateToolStripFasterFetch();
            }
        }
        public static Task <bool> FasterFetch(String path)
        {
            String repo = Git.GetBaseRepoDirectoryOrError(path);

            return(FastFetchDialog.FasterFetch(repo));
        }