- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add git pull support for Visual Studio 2017 and 2019 #3
Add git pull support for Visual Studio 2017 and 2019 #3
Conversation
Use GitCommitsPageViewModel on Team Explorer GitCommits page to pull. This implementation uses IgnoresAccessChecksToGenerator so we can access the required classes.
Don't infer the repository path from the solution.
Expose IHubService and ITeamExplorerService using AyncPackage.AddService.
Extract command action to GitPullUIService.SyncAndPullAsync. Export the IGitPullUIService service.
Add Assumes.NotNull checks to PullAsync .
Use TeamExplorerService15 for Visual Studio 2017 and TeamExplorerService16 for 2019.
These assemblies aren't available on NuGet.
No more need to special case "fatal: Not a git repository".
No need to create our own.
Activate Output window when text is first output by SyncAndPullAsync.
Project moved into GitPull folder.
Hub exposes this using StandardError.
Add PackageReference for Madskristensen.VisualStudio.SDK 15.6 and remove unnecessary references. It looks like FileAndForget was added in Visual Studio SDK 15.6.
@@ -10,7 +10,7 @@ | |||
<Tags>git</Tags> | |||
</Metadata> | |||
<Installation> | |||
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" /> | |||
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.6, 17.0)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like 15.6
doesn't mean what I thought it meant. This version won't install on VS 2017 15.9. 😕
@madskristensen What should this version be if I want it to install on 15.6 or above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
15.6 is "15.0.27428". I use this website to find out https://docs.microsoft.com/en-us/visualstudio/install/visual-studio-build-numbers-and-release-dates?view=vs-2017
Let me know when I should merge this PR |
Actually, let me just make you contributor on this |
@jcansdale is this ready for merge? |
Hi @madskristensen 👋 In hindsight I think this was too risky. It was accessing internal functionality IIRC. 😢 Alas, I don't spend much time inside VS these days. I'm going to close this PR as an experiment. |
ok |
Hi mads/jcansdale, Is this supported in VS 2019, or are you dropping this completely? |
It was using a trick to access an internal API, see the I know the Visual Studio team are doing a complete revamp of their Git support (see recent Preview versions of VS). If this is a feature you really want, this might not be a bad time to ask about it. I think there is similar functionality in VS Code which could help your case. At the moment I'm a somewhat reluctant Mac user, so I don't get much time to hack on VS. 😢 |
The aim of this PR is to use Team Explorer to perform a git pull after Hub has synced all branches. This is complicated by Team Explorer not making this functionality easily available. 😉
What this PR does
FileAndForget
was added in 15.6)Hub
Source Control - Git
output paneTeam Explorer - Synchronization
page topull
the current branchGitCommitsPageViewModel
)To do
E.g:
Maybe this could be recognized and redirected to the status bar?
E.g.
https://ci.appveyor.com/project/madskristensen/gitpull/builds/21281211#L37
@madskristensen do you know if there is any way to fix these? ☝️
Fixes #2