Push() public method

public Push ( IProgressMonitor monitor, string remote, string remoteBranch ) : void
monitor IProgressMonitor
remote string
remoteBranch string
return void
Exemplo n.º 1
0
		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 ();
			}
		}
Exemplo n.º 2
0
		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 ();
		}
Exemplo n.º 3
0
		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 ();
		}