Beispiel #1
0
        protected override void Run()
        {
            var monitor = new MessageDialogProgressMonitor(true, false, false, true);

            FileService.FreezeEvents();
            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    GitService.ReportStashResult(Repository.PopStash(monitor, 0));
                } catch (Exception ex) {
                    MessageService.ShowError(GettextCatalog.GetString("Stash operation failed"), ex);
                }
                finally {
                    monitor.Dispose();
                    Runtime.RunInMainThread(delegate {
                        FileService.ThawEvents();
                    });
                }
            });
        }
Beispiel #2
0
        protected override void Run()
        {
            var stashes = Repository.GetStashes();
            MessageDialogProgressMonitor monitor = new MessageDialogProgressMonitor(true, false, false, true);
            var statusTracker = IdeApp.Workspace.GetFileStatusTracker();

            ThreadPool.QueueUserWorkItem(delegate {
                try {
                    NGit.Api.MergeCommandResult result;
                    using (var gm = new GitMonitor(monitor))
                        result = stashes.Pop(gm);
                    GitService.ReportStashResult(monitor, result);
                } catch (Exception ex) {
                    MessageService.ShowException(ex);
                }
                finally {
                    monitor.Dispose();
                    statusTracker.NotifyChanges();
                }
            });
        }
        protected void OnButtonBranchClicked(object sender, System.EventArgs e)
        {
            Stash s          = GetSelected();
            int   stashIndex = GetSelectedIndex();

            if (s != null)
            {
                var dlg = new EditBranchDialog(repository);
                try {
                    if (MessageService.RunCustomDialog(dlg) == (int)ResponseType.Ok)
                    {
                        repository.CreateBranchFromCommit(dlg.BranchName, s.Base);
                        GitService.SwitchToBranch(repository, dlg.BranchName);
                        ApplyStashAndRemove(stashIndex);
                    }
                } finally {
                    dlg.Destroy();
                    dlg.Dispose();
                }
                Respond(ResponseType.Ok);
            }
        }
Beispiel #4
0
 protected override void Run()
 {
     GitService.Push(Repository);
 }
Beispiel #5
0
 protected override void Run()
 {
     GitService.ShowStashManager(Repository);
 }
Beispiel #6
0
 protected override void Run()
 {
     GitService.ShowMergeDialog(Repository, true);
 }
Beispiel #7
0
 protected override void Run()
 {
     GitService.ShowConfigurationDialog(Repository);
 }
Beispiel #8
0
 protected override void Run(object dataItem)
 {
     GitService.SwitchToBranch(Repository, (string)dataItem);
 }
Beispiel #9
0
 protected override void Run()
 {
     GitService.ShowConfigurationDialog(Repository.VersionControlSystem, Repository.RootPath, Repository.Url);
 }
Beispiel #10
0
 protected async override void Run(object dataItem)
 {
     await GitService.SwitchToBranchAsync(Repository, (string)dataItem).ConfigureAwait(false);
 }