Exemple #1
0
        public static void Push(MercurialRepository repo)
        {
            var dlg = new PushDialog(repo);

            try {
                if (MessageService.RunCustomDialog(dlg) != (int)Gtk.ResponseType.Ok)
                {
                    return;
                }

                string remote = dlg.SelectedRemote;
                string branch = dlg.SelectedRemoteBranch;

                IProgressMonitor monitor = VersionControlService.GetProgressMonitor(GettextCatalog.GetString("Pushing changes..."));
                System.Threading.ThreadPool.QueueUserWorkItem(delegate {
                    try {
                        repo.Push(monitor, remote, branch);
                    } catch (Exception ex) {
                        monitor.ReportError(ex.Message, ex);
                    } finally {
                        monitor.Dispose();
                    }
                });
            } finally {
                dlg.Destroy();
            }
        }
        public static void Push(MercurialRepository repo)
        {
            var dlg = new PushDialog (repo);
            try {
                if (MessageService.RunCustomDialog (dlg) != (int) Gtk.ResponseType.Ok)
                    return;

                string remote = dlg.SelectedRemote;
                string branch = dlg.SelectedRemoteBranch;

                IProgressMonitor monitor = VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Pushing changes..."));
                System.Threading.ThreadPool.QueueUserWorkItem (delegate {
                    try {
                        repo.Push (monitor, remote, branch);
                    } catch (Exception ex) {
                        monitor.ReportError (ex.Message, ex);
                    } finally {
                        monitor.Dispose ();
                    }
                });
            } finally {
                dlg.Destroy ();
            }
        }