public static void Push (GitRepository repo) { PushDialog dlg = new PushDialog (repo); if (dlg.Run () == (int) Gtk.ResponseType.Ok) { string remote = dlg.SelectedRemote; string branch = dlg.SelectedRemoteBranch; dlg.Destroy (); IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetOutputProgressMonitor ("Version Control", "md-version-control", false, true); System.Threading.ThreadPool.QueueUserWorkItem (delegate { try { repo.Push (monitor, remote, branch); } catch (Exception ex) { monitor.ReportError (ex.Message, ex); } finally { monitor.Dispose (); } }); } else dlg.Destroy (); }
public static void Push (GitRepository repo) { PushDialog dlg = new PushDialog (repo); if (dlg.Run () == (int) Gtk.ResponseType.Ok) { string remote = dlg.SelectedRemote; string branch = dlg.SelectedRemoteBranch; dlg.Destroy (); 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 (); } }); } else dlg.Destroy (); }