@@ -37,7 +37,7 @@ public class VSGitServices : IVSGitServices
37
37
[ SuppressMessage ( "Microsoft.Performance" , "CA1823:AvoidUnusedPrivateFields" , Justification = "Used in VS2017" ) ]
38
38
readonly Lazy < IStatusBarNotificationService > statusBar ;
39
39
[ SuppressMessage ( "Microsoft.Performance" , "CA1823:AvoidUnusedPrivateFields" , Justification = "Used in VS2015" ) ]
40
- readonly Lazy < IVSServices > vsServices ;
40
+ readonly Lazy < ITeamExplorerServices > teamExplorerServices ;
41
41
42
42
/// <summary>
43
43
/// This MEF export requires specific versions of TeamFoundation. IGitExt is declared here so
@@ -50,11 +50,11 @@ public class VSGitServices : IVSGitServices
50
50
[ ImportingConstructor ]
51
51
public VSGitServices ( IGitHubServiceProvider serviceProvider ,
52
52
Lazy < IStatusBarNotificationService > statusBar ,
53
- Lazy < IVSServices > vsServices )
53
+ Lazy < ITeamExplorerServices > teamExplorerServices )
54
54
{
55
55
this . serviceProvider = serviceProvider ;
56
56
this . statusBar = statusBar ;
57
- this . vsServices = vsServices ;
57
+ this . teamExplorerServices = teamExplorerServices ;
58
58
}
59
59
60
60
// The Default Repository Path that VS uses is hidden in an internal
@@ -90,7 +90,6 @@ public async Task Clone(
90
90
await StartClonenOnConnectPageAsync ( teamExplorer , cloneUrl , clonePath , recurseSubmodules ) ;
91
91
NavigateToHomePage ( teamExplorer ) ; // Show progress on Team Explorer - Home
92
92
await WaitForCloneOnHomePageAsync ( teamExplorer ) ;
93
- vsServices . Value . TryOpenRepository ( clonePath ) ; // Show the repository on Team Explorer - Home
94
93
#else
95
94
var gitExt = serviceProvider . GetService < IGitActionsExt > ( ) ;
96
95
var typedProgress = ( ( Progress < ServiceProgressData > ) progress ) ?? new Progress < ServiceProgressData > ( ) ;
@@ -100,6 +99,8 @@ public async Task Clone(
100
99
NavigateToHomePage ( teamExplorer ) ; // Show progress on Team Explorer - Home
101
100
await cloneTask ;
102
101
#endif
102
+ // Change Team Explorer context to the newly cloned repository
103
+ teamExplorerServices . Value . OpenRepository ( clonePath ) ;
103
104
}
104
105
105
106
static async Task StartClonenOnConnectPageAsync (
0 commit comments