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

Explicitly open repository when clone completes #2004

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Oct 22, 2018

When a clone completes in Visual Studio 2017, the repository context would only consistently change if there was no solution or folder open. This PR explicitly opens the repository when the clone completes. This makes the behavior consistent with Visual Studio 2015.

  • Explicitly open repository when clone completes in Visual Studio 2017
  • Use ITeamExplorerServices.OpenRepository for both Visual Studio 2015 and 2017

How to repro

  1. Open a solution in Visual Studio 2017
  2. Open the Clone dialog
  3. Start cloning a repository
  4. Expect Team Explorer and clone progress bar to appear
  5. 🐛 The active repository never changes in Team Explorer

How to test the fix

  1. Open a solution in Visual Studio 2017
  2. Open the Clone dialog
  3. Start cloning a repository
  4. Expect Team Explorer and clone progress bar to appear
  5. If there were changes in active solution, expect dialog with option to save
  6. Expect cloned repository to appear in Solution Explorer folder view
  7. Expect new repository to appear on Team Explorer (with list of solutions to open)

Fixes #2003

Explicitly open repository on Visual Studio 2015 and 2017. Although
this sometimes happens automatically on Visual Studio 2017, it doesn't
happen consistently.
@codecov
Copy link

codecov bot commented Oct 22, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@9e37f36). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master    #2004   +/-   ##
=========================================
  Coverage          ?   40.25%           
=========================================
  Files             ?      405           
  Lines             ?    17344           
  Branches          ?     2391           
=========================================
  Hits              ?     6982           
  Misses            ?     9834           
  Partials          ?      528
Impacted Files Coverage Δ
...GitHub.TeamFoundation.14/Services/VSGitServices.cs 0% <0%> (ø)

@meaghanlewis
Copy link
Contributor

@jcansdale thanks so much for fixing this problem. I had noticed it in the past but wasn't really sure why it was happening.

This looks great to me! ✨

Copy link
Contributor

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely and really simple, that's the sort of review I like 👍

@grokys grokys merged commit 991cac7 into master Oct 25, 2018
@grokys grokys deleted the fixes/2003-change-repository-when-clone-completes branch October 25, 2018 08:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repository context doesn't change after clone if solution already open
3 participants