Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <teromario@yahoo.com>2018-02-07 14:43:26 +0300
committerGitHub <noreply@github.com>2018-02-07 14:43:26 +0300
commitc578f7b19446550f808935b7d9da6c5be508e7c6 (patch)
treee957cf7c5428b96c30167f35161b07ee2af37199 /main/src/addins/VersionControl
parent24fa0c31185c54c99beef822a2c2ee5d0484dcf1 (diff)
Vcs fetch (#3788)
* [Git] Fix a string being translated twice. * [Git] Fix fetch remote from the UI not working. The old code would not task a start before running any operations on it. Start a task in the Fetch call, so users don't have to. Fixes VSTS #555713
Diffstat (limited to 'main/src/addins/VersionControl')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitConfigurationDialog.cs4
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs4
2 files changed, 5 insertions, 3 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitConfigurationDialog.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitConfigurationDialog.cs
index 87e97fc874..66c265820b 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitConfigurationDialog.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitConfigurationDialog.cs
@@ -362,7 +362,7 @@ namespace MonoDevelop.VersionControl.Git
repo.PushTag (tagName);
}
- protected void OnButtonFetchClicked (object sender, EventArgs e)
+ protected async void OnButtonFetchClicked (object sender, EventArgs e)
{
TreeIter it;
if (!treeRemotes.Selection.GetSelected (out it))
@@ -372,7 +372,7 @@ namespace MonoDevelop.VersionControl.Git
if (remoteName == null)
return;
- repo.Fetch (VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Fetching remote...")), remoteName);
+ await System.Threading.Tasks.Task.Run (() => repo.Fetch (VersionControlService.GetProgressMonitor (GettextCatalog.GetString ("Fetching remote...")), remoteName));
FillRemotes ();
}
}
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
index f6252c446a..a5a0f6b56a 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs
@@ -602,7 +602,7 @@ namespace MonoDevelop.VersionControl.Git
protected override void OnUpdate (FilePath[] localPaths, bool recurse, ProgressMonitor monitor)
{
// TODO: Make it work differently for submodules.
- monitor.BeginTask (GettextCatalog.GetString (GettextCatalog.GetString ("Updating")), 5);
+ monitor.BeginTask (GettextCatalog.GetString ("Updating"), 5);
if (RootRepository.Head.IsTracking) {
Fetch (monitor, RootRepository.Head.Remote.Name);
@@ -672,6 +672,7 @@ namespace MonoDevelop.VersionControl.Git
public void Fetch (ProgressMonitor monitor, string remote)
{
+ monitor.BeginTask (GettextCatalog.GetString ("Fetching"), 1);
monitor.Log.WriteLine (GettextCatalog.GetString ("Fetching from '{0}'", remote));
int progress = 0;
RetryUntilSuccess (monitor, credType => RootRepository.Fetch (remote, new FetchOptions {
@@ -679,6 +680,7 @@ namespace MonoDevelop.VersionControl.Git
OnTransferProgress = tp => OnTransferProgress (tp, monitor, ref progress),
}));
monitor.Step (1);
+ monitor.EndTask ();
}
bool CommonPreMergeRebase (GitUpdateOptions options, ProgressMonitor monitor, out int stashIndex)