public Push ( IProgressMonitor monitor, string remote, string remoteBranch ) : void | ||
monitor | IProgressMonitor | |
remote | string | |
remoteBranch | string | |
return | void |
public static void Push (GitRepository repo) { var dlg = new PushDialog (repo); try { if (MessageService.RunCustomDialog (dlg) != (int) Gtk.ResponseType.Ok) return; string remote = dlg.SelectedRemote; string branch = dlg.SelectedRemoteBranch ?? repo.GetCurrentBranch (); ProgressMonitor monitor = VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Pushing changes..."), VersionControlOperationType.Push); ThreadPool.QueueUserWorkItem (delegate { try { repo.Push (monitor, remote, branch); } catch (Exception ex) { monitor.ReportError (ex.Message, ex); } finally { monitor.Dispose (); } }); } finally { dlg.Destroy (); dlg.Dispose (); } }
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 (); }