Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit e141b61

Browse files
authored
Merge branch 'master' into refactor/comment-viewmodels
2 parents 7e4d8d6 + c44db52 commit e141b61

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/GitHub.TeamFoundation.14/Services/VSGitServices.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class VSGitServices : IVSGitServices
3737
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Used in VS2017")]
3838
readonly Lazy<IStatusBarNotificationService> statusBar;
3939
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Used in VS2015")]
40-
readonly Lazy<IVSServices> vsServices;
40+
readonly Lazy<ITeamExplorerServices> teamExplorerServices;
4141

4242
/// <summary>
4343
/// This MEF export requires specific versions of TeamFoundation. IGitExt is declared here so
@@ -50,11 +50,11 @@ public class VSGitServices : IVSGitServices
5050
[ImportingConstructor]
5151
public VSGitServices(IGitHubServiceProvider serviceProvider,
5252
Lazy<IStatusBarNotificationService> statusBar,
53-
Lazy<IVSServices> vsServices)
53+
Lazy<ITeamExplorerServices> teamExplorerServices)
5454
{
5555
this.serviceProvider = serviceProvider;
5656
this.statusBar = statusBar;
57-
this.vsServices = vsServices;
57+
this.teamExplorerServices = teamExplorerServices;
5858
}
5959

6060
// The Default Repository Path that VS uses is hidden in an internal
@@ -90,7 +90,6 @@ public async Task Clone(
9090
await StartClonenOnConnectPageAsync(teamExplorer, cloneUrl, clonePath, recurseSubmodules);
9191
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
9292
await WaitForCloneOnHomePageAsync(teamExplorer);
93-
vsServices.Value.TryOpenRepository(clonePath); // Show the repository on Team Explorer - Home
9493
#else
9594
var gitExt = serviceProvider.GetService<IGitActionsExt>();
9695
var typedProgress = ((Progress<ServiceProgressData>)progress) ?? new Progress<ServiceProgressData>();
@@ -100,6 +99,8 @@ public async Task Clone(
10099
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
101100
await cloneTask;
102101
#endif
102+
// Change Team Explorer context to the newly cloned repository
103+
teamExplorerServices.Value.OpenRepository(clonePath);
103104
}
104105

105106
static async Task StartClonenOnConnectPageAsync(

test/Launcher/InstallAndStart.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>net461</TargetFramework>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageReference Include="VsixTesting.Installer" Version="0.1.36-beta-g2c36f902a0" />
6+
<PackageReference Include="VsixTesting.Installer" Version="0.1.38-beta-g6b91b368d9" />
77
</ItemGroup>
88
<ItemGroup>
99
<ProjectReference Include="..\..\src\GitHub.VisualStudio\GitHub.VisualStudio.csproj" />

test/Launcher/Properties/launchSettings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"Visual Studio 2017 - Team Explorer": {
1212
"executablePath": "$(VsixTestingInstallerPath)",
1313
"commandLineArgs": "/ApplicationPath \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TeamExplorer\\Common7\\IDE\\devenv.exe\" /RootSuffix Exp /InstallAndStart \"$(SolutionDir)\\build\\$(Configuration)\\GitHub.VisualStudio.vsix\""
14+
},
15+
"Visual Studio 2019 - Preview": {
16+
"executablePath": "$(VsixTestingInstallerPath)",
17+
"commandLineArgs": "/ApplicationPath \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\Common7\\IDE\\devenv.exe\" /RootSuffix Exp /InstallAndStart \"$(SolutionDir)\\build\\$(Configuration)\\GitHub.VisualStudio.vsix\""
1418
}
1519
}
1620
}

0 commit comments

Comments
 (0)