Esempio n. 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();
                    });
                }
            });
        }
Esempio n. 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();
                }
            });
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 protected override void Run()
 {
     GitService.Push(Repository);
 }
Esempio n. 5
0
 protected override void Run()
 {
     GitService.ShowStashManager(Repository);
 }
Esempio n. 6
0
 protected override void Run()
 {
     GitService.ShowMergeDialog(Repository, true);
 }
Esempio n. 7
0
 protected override void Run()
 {
     GitService.ShowConfigurationDialog(Repository);
 }
Esempio n. 8
0
 protected override void Run(object dataItem)
 {
     GitService.SwitchToBranch(Repository, (string)dataItem);
 }
Esempio n. 9
0
 protected override void Run()
 {
     GitService.ShowConfigurationDialog(Repository.VersionControlSystem, Repository.RootPath, Repository.Url);
 }
Esempio n. 10
0
 protected async override void Run(object dataItem)
 {
     await GitService.SwitchToBranchAsync(Repository, (string)dataItem).ConfigureAwait(false);
 }