├── .gitattributes ├── .gitignore ├── .gitmodules ├── .vs └── config │ └── applicationhost.config ├── BasicSccProvider.Tests ├── BasicSccProvider.Tests.csproj ├── GetFileStatusTest.cs ├── GitFileStatusTrackerTest.cs ├── PackageTest.cs ├── Properties │ └── AssemblyInfo.cs └── RepositoryGraphTest.cs ├── BasicSccProvider.sln ├── BasicSccProvider.sln.DotSettings ├── BuildScripts ├── CleanRelease.ps1 ├── Lib │ ├── Interop.COMAdmin.dll │ ├── Interop.IWshRuntimeLibrary.dll │ ├── Ionic.Zip.dll │ ├── MSBuild Extension Pack 4 (x64).wixpdb │ ├── MSBuild Extension Pack 4 (x86).wixpdb │ ├── MSBuild.ExtensionPack.BizTalk.dll │ ├── MSBuild.ExtensionPack.Crm.dll │ ├── MSBuild.ExtensionPack.Git.dll │ ├── MSBuild.ExtensionPack.Iis7.dll │ ├── MSBuild.ExtensionPack.Loggers.dll │ ├── MSBuild.ExtensionPack.Sql2008.dll │ ├── MSBuild.ExtensionPack.Sql2012.dll │ ├── MSBuild.ExtensionPack.Sql2014.dll │ ├── MSBuild.ExtensionPack.StyleCop.dll │ ├── MSBuild.ExtensionPack.TaskFactory.Dlr.dll │ ├── MSBuild.ExtensionPack.TaskFactory.PowerShell.dll │ ├── MSBuild.ExtensionPack.Tfs2012.dll │ ├── MSBuild.ExtensionPack.Tfs2013.dll │ ├── MSBuild.ExtensionPack.dll │ └── MSBuild.ExtensionPack.dll.config └── VsixTools.ps1 ├── DataServices ├── Blob.cs ├── BlobContent.cs ├── Change.cs ├── Commit.cs ├── GitTreeObject.cs ├── GraphLink.cs ├── GraphNode.cs ├── Ref.cs ├── RepositoryGraph.cs ├── RepositoryInfo.cs └── Tree.cs ├── Diff ├── BackgroundParser.cs ├── DiffAdditionEditorFormatDefinition.cs ├── DiffFormatNames.cs ├── DiffMargin.cs ├── DiffMarginEnabled.cs ├── DiffMarginFactory.cs ├── DiffModificationEditorFormatDefinition.cs ├── DiffParseResultEventArgs.cs ├── DiffRemovedEditorFormatDefinition.cs ├── DiffUpdateBackgroundParser.cs ├── GitCommands.cs ├── GitTextViewOptions.cs ├── HunkRange.cs ├── HunkRangeInfo.cs ├── IGitCommands.cs ├── ParseResultEventArgs.cs ├── Resources │ ├── CopyOldText.png │ ├── NextArrow.png │ ├── PreviousArrow.png │ └── Rollback.png ├── View │ ├── DiffMarginControl.xaml │ └── DiffMarginControl.xaml.cs ├── ViewModel │ ├── DiffMarginViewModel.cs │ └── DiffViewModel.cs └── WeakReference.cs ├── DiffClassifier ├── DiffClassificationDefinitions.cs ├── DiffClassifier.cs ├── DiffClassifier.csproj ├── DiffClassifierProvider.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── GitApi ├── CachingFileSystemWatcher.cs ├── DataServices │ ├── Change.cs │ ├── Commit.cs │ ├── GitTreeObject.cs │ ├── GraphLink.cs │ ├── GraphNode.cs │ ├── Ref.cs │ └── RepositoryGraph.cs ├── DiffFileInfo.cs ├── Extensions │ └── StringExtensions.cs ├── GitActionResult.cs ├── GitApi.csproj ├── GitBash.cs ├── GitBashResult.cs ├── GitBranchInfo.cs ├── GitChangesetManager.cs ├── GitCommands.cs ├── GitFileStatus.cs ├── GitFileUpdateEventArgs.cs ├── GitHeadState.cs ├── GitIntellisenseHelper.cs ├── GitRepository.cs ├── GitSccOptions.cs ├── Log.cs ├── Properties │ └── AssemblyInfo.cs ├── RepositoryManager.cs └── packages.config ├── GitSccProvider ├── BasicSccProvider.cs ├── ClassDiagram.cd ├── CommandId.cs ├── Diff │ ├── BackgroundParser.cs │ ├── DiffAdditionEditorFormatDefinition.cs │ ├── DiffFormatNames.cs │ ├── DiffMargin.cs │ ├── DiffMarginEnabled.cs │ ├── DiffMarginFactory.cs │ ├── DiffModificationEditorFormatDefinition.cs │ ├── DiffParseResultEventArgs.cs │ ├── DiffRemovedEditorFormatDefinition.cs │ ├── DiffUpdateBackgroundParser.cs │ ├── GitCommands.cs │ ├── GitTextViewOptions.cs │ ├── HunkRange.cs │ ├── HunkRangeInfo.cs │ ├── IGitCommands.cs │ ├── ParseResultEventArgs.cs │ ├── Resources │ │ ├── CopyOldText.png │ │ ├── NextArrow.png │ │ ├── PreviousArrow.png │ │ └── Rollback.png │ ├── View │ │ ├── DiffMarginControl.xaml │ │ └── DiffMarginControl.xaml.cs │ ├── ViewModel │ │ ├── DiffMarginViewModel.cs │ │ └── DiffViewModel.cs │ └── WeakReference.cs ├── DiffTools.cs ├── ErrorMessages.Designer.cs ├── ErrorMessages.resx ├── ExceptionExtensions.cs ├── GitSccOptions.cs ├── GitSccProvider.csproj ├── GitToolCommands.cs ├── GlobalCommandHook.cs ├── Guids.cs ├── Key.snk ├── License.txt ├── ListViewStyle.xaml ├── MenuResources.Designer.cs ├── MenuResources.resx ├── PendingChangesToolWindow.cs ├── PendingChangesToolWindow.resx ├── PendingChangesView.xaml ├── PendingChangesView.xaml.cs ├── PkgCmd.cs ├── PkgCmd.vsct ├── PlatformUI │ ├── HeaderColors.cs │ ├── PlatformColorHelper.cs │ └── TreeViewColors.cs ├── Properties │ └── AssemblyInfo.cs ├── ProvideSourceControlProvider.cs ├── ProvideToolsOptionsPageVisibility.cs ├── ResourceDictionary.xaml ├── Resources.Designer.cs ├── Resources.resx ├── Resources │ ├── Compare.png │ ├── History.png │ ├── Images_24bit.bmp │ ├── Images_32bit.bmp │ ├── Images_32bit.png │ ├── Loading.png │ ├── Patch-Mode-Blue.xshd │ ├── Patch-Mode-Dark.xshd │ ├── PendingCheckins.png │ ├── Product.ico │ ├── Refresh.png │ ├── SccGlyphs.bmp │ ├── SccGlyphs2012.png │ ├── Switch.png │ ├── ToolWindowWithEditorCommand.png │ ├── ToolWindowWithEditorPackage.ico │ ├── UndoCheckout.png │ ├── VisualStudio.gitignore │ └── git.png ├── SccGlyphsHelper.cs ├── SccOnIdleEvent.cs ├── SccProviderOptions.cs ├── SccProviderOptionsControl.cs ├── SccProviderOptionsControl.resx ├── SccProviderService.DocumentEvents.cs ├── SccProviderService.IVsSccChanges.cs ├── SccProviderService.IVsSccCurrentBranch.cs ├── SccProviderService.IVsSccCurrentRepository.cs ├── SccProviderService.IVsSccPublish.cs ├── SccProviderService.SccEvents.cs ├── SccProviderService.SolutionEvents.cs ├── SccProviderService.cs ├── SccProviderSolutionCache.cs ├── Schedulers │ └── QueuedTaskScheduler.cs ├── StatusBar │ ├── GitApiStatusBarManager.cs │ ├── GitStatusBarManager.cs │ ├── IStatusBarService.cs │ └── StandardGitStatusBarManager.cs ├── TaskExtensions.cs ├── ToolWindowWithEditor.cs ├── UI │ ├── BranchPicker.xaml │ ├── BranchPicker.xaml.cs │ ├── GitConsole.xaml │ ├── GitConsole.xaml.cs │ ├── GitIntellisenseHelper.cs │ ├── Settings.xaml │ ├── Settings.xaml.cs │ ├── StatusBox.xaml │ └── StatusBox.xaml.cs ├── Utilities │ ├── GitCommandWrappers.cs │ ├── IgnoreFileManager.cs │ ├── SolutionExtensions.cs │ ├── SwitchBranchInfo.cs │ └── ThemeHelper.cs ├── ViewModel │ ├── MainViewModel.cs │ └── ViewModelLocator.cs ├── app.config ├── git2-a904fc6.dll ├── index.html ├── packages.config ├── solution explorer.png ├── source.extension.cs ├── source.extension.ico ├── source.extension.resx ├── source.extension.vsixmanifest └── stylesheet.css ├── GitTools ├── GitTools.csproj ├── IgnoreFileManager.cs └── Properties │ └── AssemblyInfo.cs ├── GitUI ├── App.xaml ├── App.xaml.cs ├── GitIntellisenseHelper.cs ├── GitUI.csproj ├── GitViewModel.cs ├── HistoryViewCommands.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Options.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── GitApi2.dll │ ├── ICSharpCode.AvalonEdit.dll │ ├── ICSharpCode.SharpZipLib.dll │ ├── LibGit2Sharp.dll │ ├── Loading.png │ ├── Microsoft.Win32.Primitives.dll │ ├── Microsoft.Windows.Shell.dll │ ├── Nito.AsyncEx.Concurrent.dll │ ├── Nito.AsyncEx.Enlightenment.dll │ ├── Nito.AsyncEx.dll │ ├── Patch-Mode.xshd │ ├── System.AppContext.dll │ ├── System.Collections.Concurrent.dll │ ├── System.Collections.NonGeneric.dll │ ├── System.Collections.Specialized.dll │ ├── System.Collections.dll │ ├── System.ComponentModel.EventBasedAsync.dll │ ├── System.ComponentModel.Primitives.dll │ ├── System.ComponentModel.TypeConverter.dll │ ├── System.ComponentModel.dll │ ├── System.Console.dll │ ├── System.Data.Common.dll │ ├── System.Diagnostics.Contracts.dll │ ├── System.Diagnostics.Debug.dll │ ├── System.Diagnostics.FileVersionInfo.dll │ ├── System.Diagnostics.Process.dll │ ├── System.Diagnostics.StackTrace.dll │ ├── System.Diagnostics.TextWriterTraceListener.dll │ ├── System.Diagnostics.Tools.dll │ ├── System.Diagnostics.TraceSource.dll │ ├── System.Diagnostics.Tracing.dll │ ├── System.Drawing.Primitives.dll │ ├── System.Dynamic.Runtime.dll │ ├── System.Globalization.Calendars.dll │ ├── System.Globalization.Extensions.dll │ ├── System.Globalization.dll │ ├── System.IO.Compression.ZipFile.dll │ ├── System.IO.Compression.dll │ ├── System.IO.FileSystem.DriveInfo.dll │ ├── System.IO.FileSystem.Primitives.dll │ ├── System.IO.FileSystem.Watcher.dll │ ├── System.IO.FileSystem.dll │ ├── System.IO.IsolatedStorage.dll │ ├── System.IO.MemoryMappedFiles.dll │ ├── System.IO.Pipes.dll │ ├── System.IO.UnmanagedMemoryStream.dll │ ├── System.IO.dll │ ├── System.Linq.Expressions.dll │ ├── System.Linq.Parallel.dll │ ├── System.Linq.Queryable.dll │ ├── System.Linq.dll │ ├── System.Net.Http.dll │ ├── System.Net.NameResolution.dll │ ├── System.Net.NetworkInformation.dll │ ├── System.Net.Ping.dll │ ├── System.Net.Primitives.dll │ ├── System.Net.Requests.dll │ ├── System.Net.Security.dll │ ├── System.Net.Sockets.dll │ ├── System.Net.WebHeaderCollection.dll │ ├── System.Net.WebSockets.Client.dll │ ├── System.Net.WebSockets.dll │ ├── System.ObjectModel.dll │ ├── System.Reactive.Core.dll │ ├── System.Reactive.Interfaces.dll │ ├── System.Reactive.Linq.dll │ ├── System.Reactive.PlatformServices.dll │ ├── System.Reactive.Windows.Threading.dll │ ├── System.Reflection.Extensions.dll │ ├── System.Reflection.Primitives.dll │ ├── System.Reflection.dll │ ├── System.Resources.Reader.dll │ ├── System.Resources.ResourceManager.dll │ ├── System.Resources.Writer.dll │ ├── System.Runtime.CompilerServices.VisualC.dll │ ├── System.Runtime.Extensions.dll │ ├── System.Runtime.Handles.dll │ ├── System.Runtime.InteropServices.RuntimeInformation.dll │ ├── System.Runtime.InteropServices.dll │ ├── System.Runtime.Numerics.dll │ ├── System.Runtime.Serialization.Formatters.dll │ ├── System.Runtime.Serialization.Json.dll │ ├── System.Runtime.Serialization.Primitives.dll │ ├── System.Runtime.Serialization.Xml.dll │ ├── System.Runtime.dll │ ├── System.Security.Claims.dll │ ├── System.Security.Cryptography.Algorithms.dll │ ├── System.Security.Cryptography.Csp.dll │ ├── System.Security.Cryptography.Encoding.dll │ ├── System.Security.Cryptography.Primitives.dll │ ├── System.Security.Cryptography.X509Certificates.dll │ ├── System.Security.Principal.dll │ ├── System.Security.SecureString.dll │ ├── System.Text.Encoding.Extensions.dll │ ├── System.Text.Encoding.dll │ ├── System.Text.RegularExpressions.dll │ ├── System.Threading.Overlapped.dll │ ├── System.Threading.Tasks.Parallel.dll │ ├── System.Threading.Tasks.dll │ ├── System.Threading.Thread.dll │ ├── System.Threading.ThreadPool.dll │ ├── System.Threading.Timer.dll │ ├── System.Threading.dll │ ├── System.ValueTuple.dll │ ├── System.Xml.ReaderWriter.dll │ ├── System.Xml.XDocument.dll │ ├── System.Xml.XPath.XDocument.dll │ ├── System.Xml.XPath.dll │ ├── System.Xml.XmlDocument.dll │ ├── System.Xml.XmlSerializer.dll │ ├── dragon.png │ └── netstandard.dll ├── Themes │ └── Generic.xaml ├── UI │ ├── BottomToolBar.xaml │ ├── BottomToolBar.xaml.cs │ ├── BranchPicker.xaml │ ├── BranchPicker.xaml.cs │ ├── CommitBox.xaml │ ├── CommitBox.xaml.cs │ ├── CommitDetails.xaml │ ├── CommitDetails.xaml.cs │ ├── CommitHead.xaml │ ├── CommitHead.xaml.cs │ ├── CommitRemote.xaml │ ├── CommitRemote.xaml.cs │ ├── CommitTag.xaml │ ├── CommitTag.xaml.cs │ ├── GitConsole.xaml │ ├── GitConsole.xaml.cs │ ├── HistoryGraph.xaml │ ├── HistoryGraph.xaml.cs │ ├── Loading.xaml │ ├── Loading.xaml.cs │ ├── MainToolBar.xaml │ ├── MainToolBar.xaml.cs │ ├── MouseHandlingMode.cs │ ├── PendingChanges.xaml │ ├── PendingChanges.xaml.cs │ └── ResourceDictionary.xaml ├── ZoomAndPan │ ├── AnimationHelper.cs │ ├── ZoomAndPanControl.cs │ └── ZoomAndPanControl_IScrollInfo.cs ├── app.config └── packages.config ├── JGit licence.txt ├── License.txt ├── MiscUtil licence.txt ├── PlatformUI ├── HeaderColors.cs ├── PlatformColorHelper.cs └── TreeViewColors.cs ├── Properties └── AssemblyInfo.cs ├── README.md ├── Readme.html ├── Resources ├── Compare.png ├── History.png ├── Images_24bit.bmp ├── Images_32bit.bmp ├── Images_32bit.png ├── Loading.png ├── PendingCheckins.png ├── Product.ico ├── Refresh.png ├── SccGlyphs.bmp ├── SccGlyphs2012.png ├── Switch.png └── UndoCheckout.png ├── Schedulers └── QueuedTaskScheduler.cs ├── TODO.md ├── UI ├── BranchPicker.xaml ├── BranchPicker.xaml.cs ├── CommitBox.xaml ├── CommitBox.xaml.cs ├── CommitDetails.xaml ├── CommitDetails.xaml.cs ├── CommitHead.xaml ├── CommitHead.xaml.cs ├── CommitRemote.xaml ├── CommitRemote.xaml.cs ├── CommitTag.xaml ├── CommitTag.xaml.cs ├── GitConsole.xaml ├── GitConsole.xaml.cs ├── GitIntellisenseHelper.cs ├── HistoryGraph.xaml ├── HistoryGraph.xaml.cs ├── Loading.xaml ├── Loading.xaml.cs ├── Settings.xaml └── Settings.xaml.cs ├── VsixTools.ps1 ├── _LibGit2Sharp ├── LibGit2Sharp.dll ├── ProcessForUpdatingLibGit2Sharp.txt └── git2-a904fc6.dll ├── appveyor.dev.yml ├── appveyor.yml ├── history.html ├── history.md ├── packages ├── MvvmLight.4.1.26.1 │ ├── MvvmLight.4.1.26.1.nuspec │ └── lib │ │ └── net40 │ │ ├── GalaSoft.MvvmLight.WPF4.XML │ │ └── GalaSoft.MvvmLight.WPF4.dll └── repositories.config ├── sign.bat ├── solution explorer.png └── vsgallery.html /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/.gitmodules -------------------------------------------------------------------------------- /BasicSccProvider.Tests/PackageTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Microsoft.VisualStudio.TestTools.UnitTesting; 6 | using Microsoft.VSSDK.Tools.VsIdeTesting; 7 | using Microsoft.VisualStudio.Shell.Interop; 8 | using Microsoft.VisualStudio.Shell; 9 | using EnvDTE; 10 | 11 | namespace BasicSccProvider.Tests 12 | { 13 | /// 14 | /// Integration test for package validation 15 | /// 16 | [TestClass] 17 | public class PackageTest 18 | { 19 | private delegate void ThreadInvoker(); 20 | 21 | private TestContext testContextInstance; 22 | 23 | /// 24 | ///Gets or sets the test context which provides 25 | ///information about and functionality for the current test run. 26 | /// 27 | public TestContext TestContext 28 | { 29 | get 30 | { 31 | return testContextInstance; 32 | } 33 | set 34 | { 35 | testContextInstance = value; 36 | } 37 | } 38 | 39 | [TestMethod] 40 | [HostType("VS IDE")] 41 | public void PackageLoadTest() 42 | { 43 | UIThreadInvoker.Invoke((ThreadInvoker)delegate() 44 | { 45 | 46 | //Get the Shell Service 47 | IVsShell shellService = VsIdeTestHostContext.ServiceProvider.GetService(typeof(SVsShell)) as IVsShell; 48 | Assert.IsNotNull(shellService); 49 | 50 | //Validate package load 51 | IVsPackage package; 52 | Guid packageGuid = new Guid("C4128D99-2000-41D1-A6C3-704E6C1A3DE2"); 53 | Assert.IsTrue(0 == shellService.LoadPackage(ref packageGuid, out package)); 54 | Assert.IsNotNull(package, "Package failed to load"); 55 | 56 | }); 57 | } 58 | 59 | 60 | /// 61 | /// Create project and check if the hasProjectOpened flag is set. 62 | /// 63 | [TestMethod()] 64 | [HostType("VS IDE")] 65 | public void TestHasProjectOpened() 66 | { 67 | UIThreadInvoker.Invoke((ThreadInvoker)delegate() 68 | { 69 | //Get the global service provider and the dte 70 | IServiceProvider sp = VsIdeTestHostContext.ServiceProvider; 71 | DTE dte = (DTE)sp.GetService(typeof(DTE)); 72 | dte.Solution.Open(@"E:\Users\Public\My Projects\GitScc\Publish\TestProjects\UTF8Test\UTF8Test.sln"); 73 | }); 74 | } 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /BasicSccProvider.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("BasicSccProvider.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("BasicSccProvider.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c6686e46-d8d4-4f1c-8098-4b9d8bbaf537")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /BasicSccProvider.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /BuildScripts/CleanRelease.ps1: -------------------------------------------------------------------------------- 1 |  2 | 3 | param ( 4 | [string]$gitHubUsername = $null, 5 | [string]$gitHubRepository = $null, 6 | [string]$tagName = $null, 7 | [string]$gitHubApiKey = $null 8 | ) 9 | 10 | 11 | function DeleteRelease($releaseId) 12 | { 13 | $deleteReleaseParams = @{ 14 | Uri = "https://api.github.com/repos/$gitHubUsername/$gitHubRepository/releases/$releaseId"; 15 | Method = 'DELETE'; 16 | Headers = @{ 17 | Authorization = 'token ' + $gitHubApiKey 18 | } 19 | } 20 | $result = Invoke-RestMethod @deleteReleaseParams 21 | Write-Host "Release Deleted" 22 | } 23 | 24 | function DeleteTag($tag) 25 | { 26 | 27 | $deleteTagParams = @{ 28 | Uri = "https://api.github.com/repos/$gitHubUsername/$gitHubRepository/git/refs/tags/$tag"; 29 | Method = 'DELETE'; 30 | Headers = @{ 31 | Authorization = 'token ' + $gitHubApiKey 32 | } 33 | ContentType = 'application/json'; 34 | Body = "" 35 | } 36 | Try 37 | { 38 | $result = Invoke-RestMethod @deleteTagParams 39 | Write-Host "Tag Deleted" 40 | } 41 | 42 | Catch 43 | { 44 | Write-Host "Tag Not Found" 45 | } 46 | 47 | 48 | } 49 | 50 | 51 | if ($gitHubUsername.Length -eq 0) { 52 | Write-Host "Parameter -gitHubUsername was not provided, and is required." 53 | return 54 | } 55 | 56 | if ($gitHubRepository.Length -eq 0) { 57 | Write-Host "Parameter -gitHubRepository was not provided, and is required." 58 | return 59 | } 60 | 61 | if ($tagName.Length -eq 0) { 62 | Write-Host "Parameter -tagName was not provided, and is required." 63 | return 64 | } 65 | if ($gitHubApiKey.Length -eq 0) { 66 | Write-Host "Parameter -gitHubApiKey was not provided, and is required." 67 | return 68 | } 69 | 70 | $getReleaseParams = @{ 71 | Uri = "https://api.github.com/repos/$gitHubUsername/$gitHubRepository/releases/tags/$tagName"; 72 | Method = 'GET'; 73 | Headers = @{ 74 | Authorization = 'token ' + $gitHubApiKey 75 | } 76 | } 77 | 78 | $relId; 79 | 80 | Try 81 | { 82 | $release = Invoke-RestMethod @getReleaseParams 83 | $relId = $release.id 84 | } 85 | Catch 86 | { 87 | Write-Host "Release not found" 88 | DeleteTag($tagName) 89 | Exit; 90 | } 91 | 92 | if (!$relId) 93 | { 94 | Write-Host "Release ID not found" 95 | DeleteTag($tagName) 96 | Exit; 97 | } 98 | 99 | DeleteRelease($relId) 100 | Start-Sleep -s 3 101 | DeleteTag($tagName) 102 | Start-Sleep -s 3 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /BuildScripts/Lib/Interop.COMAdmin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/Interop.COMAdmin.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/Interop.IWshRuntimeLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/Interop.IWshRuntimeLibrary.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/Ionic.Zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/Ionic.Zip.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild Extension Pack 4 (x64).wixpdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild Extension Pack 4 (x64).wixpdb -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild Extension Pack 4 (x86).wixpdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild Extension Pack 4 (x86).wixpdb -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.BizTalk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.BizTalk.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Crm.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Crm.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Git.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Git.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Iis7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Iis7.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Loggers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Loggers.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Sql2008.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Sql2008.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Sql2012.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Sql2012.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Sql2014.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Sql2014.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.StyleCop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.StyleCop.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.TaskFactory.Dlr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.TaskFactory.Dlr.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.TaskFactory.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.TaskFactory.PowerShell.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Tfs2012.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Tfs2012.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.Tfs2013.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.Tfs2013.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/BuildScripts/Lib/MSBuild.ExtensionPack.dll -------------------------------------------------------------------------------- /BuildScripts/Lib/MSBuild.ExtensionPack.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DataServices/Blob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Text; 6 | 7 | namespace GitScc.DataServices 8 | { 9 | public class Blob : ITreeObject 10 | { 11 | public string Id { get; set; } 12 | public string Name { get; set; } 13 | public byte[] Content { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /DataServices/BlobContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Data.Services.Common; 6 | using System.IO; 7 | using System.Text; 8 | 9 | namespace GitScc.DataServices 10 | { 11 | [DataServiceKey("Id")] 12 | public class BlobContent 13 | { 14 | public string Id { get; set; } 15 | public string RepoFolder { get; set; } 16 | 17 | private byte[] bytes; 18 | public byte[] Bytes 19 | { 20 | get 21 | { 22 | if (bytes == null) 23 | { 24 | // var fileName = Path.GetTempFileName(); 25 | 26 | // Git.RunCmd("cat-file -p " + this.Id + " > " + fileName, 27 | // this.RepoFolder); 28 | 29 | // bytes = File.ReadAllBytes(fileName); 30 | 31 | // if (File.Exists(fileName)) File.Delete(fileName); 32 | } 33 | return bytes; 34 | } 35 | } 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /DataServices/Change.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Change 9 | { 10 | public ChangeType ChangeType { get; set; } 11 | public string Name { get; set; } 12 | } 13 | 14 | public enum ChangeType 15 | { 16 | Added, 17 | Deleted, 18 | Modified, 19 | TypeChanged, 20 | Renamed, 21 | Copied 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /DataServices/Commit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Commit 9 | { 10 | public string Id { get; set; } 11 | public IList ParentIds { get; set; } 12 | public IList ChildIds { get; set; } 13 | public string Message { get; set; } 14 | public string CommitterName { get; set; } 15 | public string CommitterEmail { get; set; } 16 | public DateTime CommitDate { get; set; } 17 | public string CommitDateRelative { get; set; } 18 | internal bool deleted { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /DataServices/GraphLink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class GraphLink 9 | { 10 | public string Id { get; set; } 11 | public int X1 { get; set; } 12 | public int Y1 { get; set; } 13 | public int X2 { get; set; } 14 | public int Y2 { get; set; } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /DataServices/GraphNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class GraphNode : Commit 9 | { 10 | public Ref[] Refs { get; set; } 11 | //public string[] Branches { get; set; } 12 | public int X { get; set; } 13 | public int Y { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /DataServices/Ref.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Ref 9 | { 10 | public string Id { get; set; } 11 | public string RefName { get; set; } 12 | public string Name 13 | { 14 | get 15 | { 16 | var name = RefName.Replace("refs/", ""); 17 | return name.Substring(name.IndexOf("/") + 1); 18 | } 19 | } 20 | public RefTypes Type 21 | { 22 | get 23 | { 24 | if (RefName == "HEAD") return RefTypes.HEAD; 25 | else if (RefName.StartsWith("refs/heads")) return RefTypes.Branch; 26 | else if (RefName.StartsWith("refs/tags")) return RefTypes.Tag; 27 | else if (RefName.StartsWith("refs/remotes")) return RefTypes.RemoteBranch; 28 | return RefTypes.Unknown; 29 | } 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Name; 35 | } 36 | } 37 | 38 | public enum RefTypes 39 | { 40 | Unknown, 41 | HEAD, 42 | Branch, 43 | Tag, 44 | RemoteBranch 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /DataServices/RepositoryInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Services.Common; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text.RegularExpressions; 7 | using System.Security.Cryptography; 8 | using System.Text; 9 | using System.Configuration; 10 | 11 | namespace GitScc.DataServices 12 | { 13 | [DataServiceKey("Id")] 14 | public class RepositoryInfo 15 | { 16 | public string Id { get; set; } 17 | public string Name { get; set; } 18 | public string RepoFolder { get; set; } 19 | 20 | public static RepositoryInfo Open(string directory) 21 | { 22 | var repo = new RepositoryInfo 23 | { 24 | Name = Path.GetFileNameWithoutExtension(directory), 25 | RepoFolder = directory, 26 | //Id = GetId(directory) 27 | }; 28 | return repo; 29 | } 30 | 31 | public IEnumerable Commits 32 | { 33 | get 34 | { 35 | var git = NGit.Api.Git.Open(RepoFolder); 36 | var commits = git.Log().Call(); 37 | return from c in commits 38 | select new Commit 39 | { 40 | Id = c.Id.Name, 41 | ParentIds = string.Join(",", c.Parents.Select(p => p.Id.Name).ToArray()), 42 | //CommitDateRelative = ss[2], 43 | CommitterName = c.GetCommitterIdent().GetName(), 44 | CommitterEmail = c.GetCommitterIdent().GetEmailAddress(), 45 | CommitDate = c.GetCommitterIdent().GetWhen(), 46 | Tree = new Tree 47 | { 48 | Id = c.Tree.Id.Name, 49 | RepoFolder = this.RepoFolder, 50 | Name = c.Tree.Name 51 | }, 52 | Message = c.GetShortMessage(), 53 | }; 54 | } 55 | } 56 | 57 | public IEnumerable Refs 58 | { 59 | get 60 | { 61 | var repository = NGit.Api.Git.Open(RepoFolder).GetRepository(); 62 | var refs = from r in repository.GetAllRefs() 63 | where !r.Value.IsSymbolic() 64 | select new Ref 65 | { 66 | Id = r.Value.GetTarget().GetObjectId().Name, 67 | RefName = r.Key.Replace("refs/", ""), 68 | }; 69 | 70 | repository.Close(); 71 | return refs; 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /DataServices/Tree.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Data.Services.Common; 6 | 7 | namespace GitScc.DataServices 8 | { 9 | [DataServiceKey("Id")] 10 | public class Tree 11 | { 12 | public string Id { get; set; } 13 | public string Name { get; set; } 14 | public string RepoFolder { get; set; } 15 | 16 | public IEnumerable Trees 17 | { 18 | get 19 | { 20 | var repository = NGit.Api.Git.Open(RepoFolder).GetRepository(); 21 | 22 | //repository.Close(); 23 | //return from c in Git.Run("ls-tree " + this.Id, this.RepoFolder).Split('\n') 24 | // where !string.IsNullOrWhiteSpace(c) && 25 | // c.Substring(7, 4) == "tree" 26 | // select new Tree 27 | // { 28 | // Id = c.Substring(12, 40), 29 | // RepoFolder = this.RepoFolder, 30 | // Name = this.Name + c.Substring(52) + "\\", 31 | // }; 32 | 33 | return null; 34 | } 35 | } 36 | 37 | public IEnumerable Blobs 38 | { 39 | get 40 | { 41 | //return from c in Git.Run("ls-tree " + this.Id, this.RepoFolder).Split('\n') 42 | // where !string.IsNullOrWhiteSpace(c) && 43 | // c.Substring(7, 4) == "blob" 44 | // select new Blob 45 | // { 46 | // Id = c.Substring(12, 40), 47 | // Name = c.Substring(52), 48 | // Content = new BlobContent 49 | // { 50 | // Id = c.Substring(12, 40), 51 | // RepoFolder = this.RepoFolder, 52 | // } 53 | // }; 54 | 55 | return null; 56 | } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /Diff/DiffAdditionEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Addition)] 10 | [UserVisible(true)] 11 | internal sealed class DiffAdditionEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffAdditionEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(180, 255, 180); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Addition"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Diff/DiffFormatNames.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | public static class DiffFormatNames 4 | { 5 | public const string Addition = "GitDiffAddition"; 6 | public const string Modification = "GitDiffModification"; 7 | public const string Removed = "GitDiffRemoved"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Diff/DiffMarginEnabled.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using Microsoft.VisualStudio.Text.Editor; 5 | using Microsoft.VisualStudio.Utilities; 6 | 7 | [Export(typeof(EditorOptionDefinition))] 8 | [Name(GitTextViewOptions.DiffMarginName)] 9 | public sealed class DiffMarginEnabled : ViewOptionDefinition 10 | { 11 | public override bool Default 12 | { 13 | get 14 | { 15 | return true; 16 | } 17 | } 18 | 19 | public override EditorOptionKey Key 20 | { 21 | get 22 | { 23 | return GitTextViewOptions.DiffMarginId; 24 | } 25 | } 26 | 27 | [Export(typeof(IWpfTextViewCreationListener))] 28 | [ContentType("text")] 29 | [TextViewRole(PredefinedTextViewRoles.Document)] 30 | private class TextViewListener : IWpfTextViewCreationListener 31 | { 32 | public void TextViewCreated(IWpfTextView textView) 33 | { 34 | if (textView == null) 35 | return; 36 | 37 | textView.Options.SetOptionValue(GitTextViewOptions.DiffMarginId, !GitSccOptions.Current.DisableDiffMargin); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Diff/DiffMarginFactory.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using Microsoft.VisualStudio.Text; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Text.Editor; 7 | using Microsoft.VisualStudio.Utilities; 8 | 9 | [Export(typeof(IWpfTextViewMarginProvider))] 10 | [Name(DiffMargin.MarginName)] 11 | [Order(After = PredefinedMarginNames.Spacer, Before = PredefinedMarginNames.Outlining)] 12 | [MarginContainer(PredefinedMarginNames.LeftSelection)] 13 | [ContentType("text")] 14 | [TextViewRole(PredefinedTextViewRoles.Editable)] 15 | internal sealed class DiffMarginFactory : IWpfTextViewMarginProvider 16 | { 17 | [Import] 18 | internal ITextDocumentFactoryService TextDocumentFactoryService 19 | { 20 | get; 21 | private set; 22 | } 23 | 24 | [Import] 25 | internal IClassificationFormatMapService ClassificationFormatMapService 26 | { 27 | get; 28 | private set; 29 | } 30 | 31 | [Import] 32 | internal IEditorFormatMapService EditorFormatMapService 33 | { 34 | get; 35 | private set; 36 | } 37 | 38 | public IWpfTextViewMargin CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) 39 | { 40 | return new DiffMargin(textViewHost.TextView, this); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Diff/DiffModificationEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Modification)] 10 | [UserVisible(true)] 11 | internal sealed class DiffModificationEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffModificationEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(160, 200, 255); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Modification"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Diff/DiffParseResultEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Microsoft.VisualStudio.Text; 6 | 7 | public class DiffParseResultEventArgs : ParseResultEventArgs 8 | { 9 | private readonly List _diff; 10 | 11 | public DiffParseResultEventArgs(ITextSnapshot snapshot, TimeSpan elapsedTime, List diff) 12 | : base(snapshot, elapsedTime) 13 | { 14 | _diff = diff; 15 | } 16 | 17 | public List Diff 18 | { 19 | get 20 | { 21 | return _diff; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Diff/DiffRemovedEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Removed)] 10 | [UserVisible(true)] 11 | internal sealed class DiffRemovedEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffRemovedEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(255, 160, 180); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Removed"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Diff/GitTextViewOptions.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using Microsoft.VisualStudio.Text.Editor; 4 | 5 | public static class GitTextViewOptions 6 | { 7 | public const string DiffMarginName = "GitScc/DiffMarginName"; 8 | 9 | public static readonly EditorOptionKey DiffMarginId = new EditorOptionKey(DiffMarginName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Diff/HunkRange.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | public struct HunkRange 4 | { 5 | private readonly int _startingLineNumber; 6 | private readonly int _numberOfLines; 7 | 8 | public HunkRange(int startingLineNumber, int numberOfLines) 9 | { 10 | _startingLineNumber = startingLineNumber; 11 | _numberOfLines = numberOfLines; 12 | } 13 | 14 | public int StartingLineNumber 15 | { 16 | get 17 | { 18 | return _startingLineNumber; 19 | } 20 | } 21 | 22 | public int NumberOfLines 23 | { 24 | get 25 | { 26 | return _numberOfLines; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Diff/IGitCommands.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.Collections.Generic; 4 | using ITextDocument = Microsoft.VisualStudio.Text.ITextDocument; 5 | using ITextSnapshot = Microsoft.VisualStudio.Text.ITextSnapshot; 6 | 7 | public interface IGitCommands 8 | { 9 | IEnumerable GetGitDiffFor(ITextDocument textDocument, ITextSnapshot snapshot); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Diff/ParseResultEventArgs.cs: -------------------------------------------------------------------------------- 1 | /* The MIT License 2 | * 3 | * Copyright (c) 2013 Sam Harwell, Tunnel Vision Labs, LLC 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | namespace GitScc.Diff 26 | { 27 | using System; 28 | using Microsoft.VisualStudio.Text; 29 | 30 | public class ParseResultEventArgs : EventArgs 31 | { 32 | public ParseResultEventArgs(ITextSnapshot snapshot) 33 | { 34 | this.Snapshot = snapshot; 35 | } 36 | 37 | public ParseResultEventArgs(ITextSnapshot snapshot, TimeSpan elapsedTime) 38 | { 39 | this.Snapshot = snapshot; 40 | this.ElapsedTime = elapsedTime; 41 | } 42 | 43 | public ITextSnapshot Snapshot 44 | { 45 | get; 46 | private set; 47 | } 48 | 49 | public TimeSpan? ElapsedTime 50 | { 51 | get; 52 | private set; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Diff/Resources/CopyOldText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/Diff/Resources/CopyOldText.png -------------------------------------------------------------------------------- /Diff/Resources/NextArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/Diff/Resources/NextArrow.png -------------------------------------------------------------------------------- /Diff/Resources/PreviousArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/Diff/Resources/PreviousArrow.png -------------------------------------------------------------------------------- /Diff/Resources/Rollback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/Diff/Resources/Rollback.png -------------------------------------------------------------------------------- /Diff/View/DiffMarginControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff.View 2 | { 3 | using System.Windows.Controls; 4 | 5 | public partial class DiffMarginControl : UserControl 6 | { 7 | public DiffMarginControl() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Diff/WeakReference.cs: -------------------------------------------------------------------------------- 1 | /* The MIT License 2 | * 3 | * Copyright (c) 2013 Sam Harwell, Tunnel Vision Labs, LLC 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | namespace GitScc.Diff 26 | { 27 | using SerializationInfo = System.Runtime.Serialization.SerializationInfo; 28 | using StreamingContext = System.Runtime.Serialization.StreamingContext; 29 | using WeakReference = System.WeakReference; 30 | 31 | public class WeakReference : WeakReference 32 | where T : class 33 | { 34 | public WeakReference(object target) 35 | : base(target) 36 | { 37 | } 38 | 39 | public WeakReference(object target, bool trackResurrection) 40 | : base(target, trackResurrection) 41 | { 42 | } 43 | 44 | protected WeakReference(SerializationInfo info, StreamingContext context) 45 | : base(info, context) 46 | { 47 | } 48 | 49 | public new T Target 50 | { 51 | get 52 | { 53 | return (T)base.Target; 54 | } 55 | 56 | set 57 | { 58 | base.Target = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /DiffClassifier/DiffClassifierProvider.cs: -------------------------------------------------------------------------------- 1 | //*************************************************************************** 2 | // 3 | // Copyright (c) Microsoft Corporation. All rights reserved. 4 | // This code is licensed under the Visual Studio SDK license terms. 5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | // 10 | //*************************************************************************** 11 | 12 | // Copyright (c) Microsoft Corporation 13 | // All rights reserved 14 | 15 | namespace DiffClassifier 16 | { 17 | using System.ComponentModel.Composition; 18 | using Microsoft.VisualStudio.Text; 19 | using Microsoft.VisualStudio.Text.Classification; 20 | using Microsoft.VisualStudio.Utilities; 21 | 22 | [Export(typeof(IClassifierProvider))] 23 | [ContentType("diff")] 24 | internal class DiffClassifierProvider : IClassifierProvider 25 | { 26 | [Import] 27 | internal IClassificationTypeRegistryService ClassificationRegistry = null; 28 | 29 | static DiffClassifier diffClassifier; 30 | 31 | public IClassifier GetClassifier(ITextBuffer buffer) 32 | { 33 | if (diffClassifier == null) 34 | diffClassifier = new DiffClassifier(ClassificationRegistry); 35 | 36 | return diffClassifier; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /DiffClassifier/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DiffClassifier")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("DiffClassifier")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2a14b445-6437-494b-8417-bcfc08617377")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /DiffClassifier/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /GitApi/CachingFileSystemWatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GitScc 8 | { 9 | class CachingFileSystemWatcher 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /GitApi/DataServices/Change.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Change 9 | { 10 | public ChangeType ChangeType { get; set; } 11 | public string Name { get; set; } 12 | } 13 | 14 | public enum ChangeType 15 | { 16 | Added, 17 | Deleted, 18 | Modified, 19 | TypeChanged, 20 | Renamed, 21 | Copied, 22 | Unmerged, 23 | Unknown 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /GitApi/DataServices/Commit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Commit 9 | { 10 | public string Id { get; set; } 11 | public IList ParentIds { get; set; } 12 | public IList ChildIds { get; set; } 13 | public string Subject { get; set; } 14 | public string Message { get; set; } 15 | public string TreeId { get; set; } 16 | public string AuthorName { get; set; } 17 | public string AuthorEmail { get; set; } 18 | public DateTime AuthorDate { get; set; } 19 | public string AuthorDateRelative { get; set; } 20 | internal bool deleted { get; set; } 21 | 22 | public override string ToString() 23 | { 24 | return string.Format("[{0}] {1}", ShortId, Subject.Replace("\r", "")); 25 | } 26 | 27 | public string ShortId { get { return Id.Substring(0, 7); } } } 28 | } -------------------------------------------------------------------------------- /GitApi/DataServices/GraphLink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class GraphLink 9 | { 10 | public string Id { get; set; } 11 | public int X1 { get; set; } 12 | public int Y1 { get; set; } 13 | public int X2 { get; set; } 14 | public int Y2 { get; set; } 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /GitApi/DataServices/GraphNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class GraphNode : Commit 9 | { 10 | public Ref[] Refs { get; set; } 11 | //public string[] Branches { get; set; } 12 | public int X { get; set; } 13 | public int Y { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /GitApi/DataServices/Ref.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace GitScc.DataServices 7 | { 8 | public class Ref 9 | { 10 | private readonly string _name; 11 | private readonly string _refName; 12 | private readonly string _id; 13 | private readonly RefTypes _refType; 14 | 15 | public Ref(string name, string refName, string id, RefTypes refType) 16 | { 17 | _name = name; 18 | _refName = refName; 19 | _refType = refType; 20 | _id = id; 21 | } 22 | 23 | public string Id => _id; 24 | public string RefName => _refName; 25 | public string Name => _name; 26 | 27 | public RefTypes Type => _refType; 28 | 29 | 30 | public override string ToString() 31 | { 32 | return Name; 33 | } 34 | } 35 | 36 | public enum RefTypes 37 | { 38 | Unknown, 39 | HEAD, 40 | Branch, 41 | Tag, 42 | RemoteBranch 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /GitApi/DiffFileInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc 7 | { 8 | public class DiffFileInfo 9 | { 10 | public string UnmodifiedFilePath { get; set; } 11 | public string ModifiedFilePath { get; set; } 12 | public string ActualFilename { get; set; } 13 | public string LastRevision { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /GitApi/GitActionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc 7 | { 8 | public class GitActionResult 9 | { 10 | public T Item { get; set; } 11 | public bool Succeeded { get; set; } 12 | public string ErrorMessage { get; set; } 13 | 14 | public GitActionResult() 15 | { 16 | Succeeded = false; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /GitApi/GitBashResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc 7 | { 8 | public class GitBashResult 9 | { 10 | public bool HasError { get; set; } 11 | 12 | public string Error { get; set; } 13 | 14 | public string Output { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GitApi/GitBranchInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace GitScc 7 | { 8 | public class GitBranchInfo 9 | { 10 | private const string REMOTE_FULL_NAME = "remotes/{0}/{1}"; 11 | 12 | public string Name { get; set; } 13 | public string FullName { 14 | get 15 | { 16 | return IsRemote ? string.Format(REMOTE_FULL_NAME, RemoteName, Name) : Name; 17 | } 18 | } 19 | public bool IsRemote { get; set; } 20 | public string RemoteName { get; set; } 21 | /// 22 | /// Gets the full name of this reference. 23 | /// 24 | /// 25 | public string CanonicalName { get; set; } 26 | public bool IsCurrentRepoHead { get; set; } 27 | 28 | /// 29 | /// Gets the 40 character sha1 of this object. 30 | /// 31 | /// 32 | public string Sha { get; set; } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /GitApi/GitCommands.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using LibGit2Sharp; 3 | 4 | namespace GitScc 5 | { 6 | public static class GitCommands 7 | { 8 | //TODO mode ot RepoManager 9 | public static DiffFileInfo GenerateDiffFileInfo(GitRepository repository, string filename) 10 | { 11 | var info = new DiffFileInfo(); 12 | 13 | info.ActualFilename = Path.GetFileName(filename); 14 | info.ModifiedFilePath = filename; 15 | info.LastRevision = repository.GetRevision(filename); 16 | 17 | var filetype = Path.GetExtension(filename); 18 | 19 | //write unmodified file to disk 20 | var unmodifiedFile = repository.GetUnmodifiedFileByAbsolutePath(filename); 21 | var tempFileName = Path.GetTempFileName() + filetype; 22 | File.WriteAllText(tempFileName, unmodifiedFile); 23 | info.UnmodifiedFilePath = tempFileName; 24 | 25 | return info; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GitApi/GitFileUpdateEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GitScc 8 | { 9 | 10 | 11 | public class GitFilesUpdateEventArgs : EventArgs 12 | { 13 | public List Files { get; set; } 14 | 15 | public GitFilesUpdateEventArgs(List files) 16 | { 17 | Files = files; 18 | } 19 | } 20 | 21 | public class GitFilesStatusUpdateEventArgs : EventArgs 22 | { 23 | public List Files { get; set; } 24 | 25 | public GitFilesStatusUpdateEventArgs(List files) 26 | { 27 | Files = files; 28 | } 29 | } 30 | 31 | public class GitRepositoryEvent : EventArgs 32 | { 33 | public GitRepository Repository { get; private set; } 34 | 35 | public GitRepositoryEvent(GitRepository repository) 36 | { 37 | Repository = repository; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /GitApi/GitHeadState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using LibGit2Sharp; 7 | 8 | namespace GitScc 9 | { 10 | public class GitHeadState 11 | { 12 | public string BranchName { get; set; } 13 | public CurrentOperation Operation { get; set; } 14 | public string Sha { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GitApi/Log.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Gitscc 8 | { 9 | public abstract class Log 10 | { 11 | private static string logFileName = Path.Combine( 12 | Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), 13 | "gitscc.log"); 14 | 15 | public static void WriteLine(string format, params object[] objects) 16 | { 17 | //#if(DEBUG) 18 | var msg = string.Format(format, objects); 19 | msg = string.Format("{0} {1}\r\n\r\n", DateTime.UtcNow.ToString(), msg); 20 | File.AppendAllText(logFileName, msg); 21 | //#endif 22 | } 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /GitApi/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GitApi")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("GitApi")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5d4ce710-e1fa-4b51-aa4e-f53ea8321466")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GitApi/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /GitSccProvider/ClassDiagram.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | EAAAC4AYgCBAGAAAEAIABCEAYgQAAIAqAAAQuIASAAA= 7 | SccProviderService.cs 8 | 9 | 10 | 11 | 12 | 13 | 14 | AAEAAAAACCAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAEA= 15 | BasicSccProvider.cs 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /GitSccProvider/CommandId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace GitScc 4 | { 5 | /// 6 | /// This class is used to expose the list of the IDs of the commands implemented 7 | /// by the client package. This list of IDs must match the set of IDs defined inside the 8 | /// VSCT file. 9 | /// 10 | static class CommandId 11 | { 12 | // Define the list a set of public static members. 13 | public const int icmdSccCommandRefresh = 0x101; 14 | public const int icmdSccCommandGitBash = 0x102; 15 | public const int icmdSccCommandGitExtension = 0x103; 16 | public const int icmdSccCommandCompare = 0x104; 17 | public const int icmdSccCommandUndo = 0x105; 18 | public const int icmdSccCommandInit = 0x106; 19 | public const int icmdSccCommandPendingChanges = 0x107; 20 | public const int icmdSccCommandHistory = 0x108; 21 | public const int icmdSccCommandGitTortoise = 0x109; 22 | public const int icmdSccCommandEditIgnore = 0x110; 23 | public const int cmdidGitIgnoreSubMenuCommandUpdate = 0x2016; 24 | 25 | public const int icmdPendingChangesCommit = 0x111; 26 | public const int icmdPendingChangesAmend = 0x112; 27 | public const int icmdPendingChangesCommitToBranch = 0x113; 28 | 29 | public const int icmdPendingChangesRefresh = 0x114; 30 | public const int icmdHistoryViewRefresh = 0x115; 31 | public const int icmdPendingChangesSettings = 0x116; 32 | 33 | // Define the list of menus (these include toolbars) 34 | public const int imnuHistoryToolWindowToolbarMenu = 0x200; 35 | public const int imnuPendingChangesToolWindowToolbarMenu = 0x202; 36 | 37 | public const int imnuGitSourceControlMenu = 0x205; 38 | public const int imnuPendingChangesToolWindowGitExt = 0x951; 39 | public const int imnuPendingChangesToolWindowGitTor = 0x961; 40 | 41 | // Define the list of icons (use decimal numbers here, to match the resource IDs) 42 | public const int iiconProductIcon = 400; 43 | 44 | // Define the list of bitmaps (use decimal numbers here, to match the resource IDs) 45 | public const int ibmpToolbarMenusImages = 500; 46 | public const int ibmpToolWindowsImages = 501; 47 | 48 | // Glyph indexes in the bitmap used for toolwindows (ibmpToolWindowsImages) 49 | public const int iconSccProviderToolWindow = 0; 50 | 51 | public const int icmdGitExtCommand1 = 0x811; 52 | public const int icmdGitTorCommand1 = 0x911; 53 | public const int icmdGitIgnoreCommand1 = 0x2001; 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffAdditionEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Addition)] 10 | [UserVisible(true)] 11 | internal sealed class DiffAdditionEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffAdditionEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(180, 255, 180); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Addition"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffFormatNames.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | public static class DiffFormatNames 4 | { 5 | public const string Addition = "GitDiffAddition"; 6 | public const string Modification = "GitDiffModification"; 7 | public const string Removed = "GitDiffRemoved"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffMarginEnabled.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using Microsoft.VisualStudio.Text.Editor; 5 | using Microsoft.VisualStudio.Utilities; 6 | 7 | [Export(typeof(EditorOptionDefinition))] 8 | [Name(GitTextViewOptions.DiffMarginName)] 9 | public sealed class DiffMarginEnabled : ViewOptionDefinition 10 | { 11 | public override bool Default 12 | { 13 | get 14 | { 15 | return true; 16 | } 17 | } 18 | 19 | public override EditorOptionKey Key 20 | { 21 | get 22 | { 23 | return GitTextViewOptions.DiffMarginId; 24 | } 25 | } 26 | 27 | [Export(typeof(IWpfTextViewCreationListener))] 28 | [ContentType("text")] 29 | [TextViewRole(PredefinedTextViewRoles.Document)] 30 | private class TextViewListener : IWpfTextViewCreationListener 31 | { 32 | public void TextViewCreated(IWpfTextView textView) 33 | { 34 | if (textView == null) 35 | return; 36 | 37 | textView.Options.SetOptionValue(GitTextViewOptions.DiffMarginId, !GitSccOptions.Current.DisableDiffMargin); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffMarginFactory.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using Microsoft.VisualStudio.Text; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Text.Editor; 7 | using Microsoft.VisualStudio.Utilities; 8 | 9 | [Export(typeof(IWpfTextViewMarginProvider))] 10 | [Name(DiffMargin.MarginName)] 11 | [Order(After = PredefinedMarginNames.Spacer, Before = PredefinedMarginNames.Outlining)] 12 | [MarginContainer(PredefinedMarginNames.LeftSelection)] 13 | [ContentType("text")] 14 | [TextViewRole(PredefinedTextViewRoles.Editable)] 15 | internal sealed class DiffMarginFactory : IWpfTextViewMarginProvider 16 | { 17 | [Import] 18 | internal ITextDocumentFactoryService TextDocumentFactoryService 19 | { 20 | get; 21 | private set; 22 | } 23 | 24 | [Import] 25 | internal IClassificationFormatMapService ClassificationFormatMapService 26 | { 27 | get; 28 | private set; 29 | } 30 | 31 | [Import] 32 | internal IEditorFormatMapService EditorFormatMapService 33 | { 34 | get; 35 | private set; 36 | } 37 | 38 | public IWpfTextViewMargin CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) 39 | { 40 | return new DiffMargin(textViewHost.TextView, this); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffModificationEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Modification)] 10 | [UserVisible(true)] 11 | internal sealed class DiffModificationEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffModificationEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(160, 200, 255); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Modification"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffParseResultEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using Microsoft.VisualStudio.Text; 6 | 7 | public class DiffParseResultEventArgs : ParseResultEventArgs 8 | { 9 | private readonly List _diff; 10 | 11 | public DiffParseResultEventArgs(ITextSnapshot snapshot, TimeSpan elapsedTime, List diff) 12 | : base(snapshot, elapsedTime) 13 | { 14 | _diff = diff; 15 | } 16 | 17 | public List Diff 18 | { 19 | get 20 | { 21 | return _diff; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/DiffRemovedEditorFormatDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.ComponentModel.Composition; 4 | using System.Windows.Media; 5 | using Microsoft.VisualStudio.Text.Classification; 6 | using Microsoft.VisualStudio.Utilities; 7 | 8 | [Export(typeof(EditorFormatDefinition))] 9 | [Name(DiffFormatNames.Removed)] 10 | [UserVisible(true)] 11 | internal sealed class DiffRemovedEditorFormatDefinition : EditorFormatDefinition 12 | { 13 | public DiffRemovedEditorFormatDefinition() 14 | { 15 | BackgroundColor = Color.FromRgb(255, 160, 180); 16 | ForegroundCustomizable = false; 17 | DisplayName = "Git Diff Removed"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/GitTextViewOptions.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using Microsoft.VisualStudio.Text.Editor; 4 | 5 | public static class GitTextViewOptions 6 | { 7 | public const string DiffMarginName = "GitScc/DiffMarginName"; 8 | 9 | public static readonly EditorOptionKey DiffMarginId = new EditorOptionKey(DiffMarginName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/HunkRange.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | public struct HunkRange 4 | { 5 | private readonly int _startingLineNumber; 6 | private readonly int _numberOfLines; 7 | 8 | public HunkRange(int startingLineNumber, int numberOfLines) 9 | { 10 | _startingLineNumber = startingLineNumber; 11 | _numberOfLines = numberOfLines; 12 | } 13 | 14 | public int StartingLineNumber 15 | { 16 | get 17 | { 18 | return _startingLineNumber; 19 | } 20 | } 21 | 22 | public int NumberOfLines 23 | { 24 | get 25 | { 26 | return _numberOfLines; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/IGitCommands.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff 2 | { 3 | using System.Collections.Generic; 4 | using ITextDocument = Microsoft.VisualStudio.Text.ITextDocument; 5 | using ITextSnapshot = Microsoft.VisualStudio.Text.ITextSnapshot; 6 | 7 | public interface IGitCommands 8 | { 9 | IEnumerable GetGitDiffFor(ITextDocument textDocument, ITextSnapshot snapshot); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/ParseResultEventArgs.cs: -------------------------------------------------------------------------------- 1 | /* The MIT License 2 | * 3 | * Copyright (c) 2013 Sam Harwell, Tunnel Vision Labs, LLC 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | namespace GitScc.Diff 26 | { 27 | using System; 28 | using Microsoft.VisualStudio.Text; 29 | 30 | public class ParseResultEventArgs : EventArgs 31 | { 32 | public ParseResultEventArgs(ITextSnapshot snapshot) 33 | { 34 | this.Snapshot = snapshot; 35 | } 36 | 37 | public ParseResultEventArgs(ITextSnapshot snapshot, TimeSpan elapsedTime) 38 | { 39 | this.Snapshot = snapshot; 40 | this.ElapsedTime = elapsedTime; 41 | } 42 | 43 | public ITextSnapshot Snapshot 44 | { 45 | get; 46 | private set; 47 | } 48 | 49 | public TimeSpan? ElapsedTime 50 | { 51 | get; 52 | private set; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/Resources/CopyOldText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Diff/Resources/CopyOldText.png -------------------------------------------------------------------------------- /GitSccProvider/Diff/Resources/NextArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Diff/Resources/NextArrow.png -------------------------------------------------------------------------------- /GitSccProvider/Diff/Resources/PreviousArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Diff/Resources/PreviousArrow.png -------------------------------------------------------------------------------- /GitSccProvider/Diff/Resources/Rollback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Diff/Resources/Rollback.png -------------------------------------------------------------------------------- /GitSccProvider/Diff/View/DiffMarginControl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.Diff.View 2 | { 3 | using System.Windows.Controls; 4 | 5 | public partial class DiffMarginControl : UserControl 6 | { 7 | public DiffMarginControl() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /GitSccProvider/Diff/WeakReference.cs: -------------------------------------------------------------------------------- 1 | /* The MIT License 2 | * 3 | * Copyright (c) 2013 Sam Harwell, Tunnel Vision Labs, LLC 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining 6 | * a copy of this software and associated documentation files (the 7 | * "Software"), to deal in the Software without restriction, including 8 | * without limitation the rights to use, copy, modify, merge, publish, 9 | * distribute, sublicense, and/or sell copies of the Software, and to 10 | * permit persons to whom the Software is furnished to do so, subject to 11 | * the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be 14 | * included in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | namespace GitScc.Diff 26 | { 27 | using SerializationInfo = System.Runtime.Serialization.SerializationInfo; 28 | using StreamingContext = System.Runtime.Serialization.StreamingContext; 29 | using WeakReference = System.WeakReference; 30 | 31 | public class WeakReference : WeakReference 32 | where T : class 33 | { 34 | public WeakReference(object target) 35 | : base(target) 36 | { 37 | } 38 | 39 | public WeakReference(object target, bool trackResurrection) 40 | : base(target, trackResurrection) 41 | { 42 | } 43 | 44 | protected WeakReference(SerializationInfo info, StreamingContext context) 45 | : base(info, context) 46 | { 47 | } 48 | 49 | public new T Target 50 | { 51 | get 52 | { 53 | return (T)base.Target; 54 | } 55 | 56 | set 57 | { 58 | base.Target = value; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /GitSccProvider/DiffTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GitSccProvider 9 | { 10 | public enum DiffTools :int 11 | { 12 | [Description("Visual Studio")] 13 | VisualStudio, 14 | [Description("Default Git Tool (Set in your .gitconfig)")] 15 | GitDefault 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /GitSccProvider/Guids.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | This code is licensed under the Visual Studio SDK license terms. 5 | THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | 10 | ***************************************************************************/ 11 | 12 | using System; 13 | 14 | namespace GitScc 15 | { 16 | /// 17 | /// This class is used only to expose the list of Guids used by this package. 18 | /// This list of guids must match the set of Guids used inside the VSCT file. 19 | /// 20 | static class GuidList 21 | { 22 | // Now define the list of guids as public static members. 23 | 24 | // Unique ID of the source control provider; this is also used as the command UI context to show/hide the pacakge UI 25 | public static readonly Guid guidSccProvider = new Guid("{C4128D99-0000-41D1-A6C3-704E6C1A3DE2}"); 26 | // The guid of the source control provider service (implementing IVsSccProvider interface) 27 | public static readonly Guid guidSccProviderService = new Guid("{C4128D99-1000-41D1-A6C3-704E6C1A3DE2}"); 28 | // The guid of the source control provider package (implementing IVsPackage interface) 29 | public static readonly Guid guidSccProviderPkg = new Guid("{C4128D99-2000-41D1-A6C3-704E6C1A3DE2}"); 30 | 31 | //Other guids for menus and commands 32 | public static readonly Guid guidSccProviderCmdSet = new Guid("{C4A089DA-E640-438d-A977-815C267CA76D}"); 33 | 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /GitSccProvider/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Key.snk -------------------------------------------------------------------------------- /GitSccProvider/PlatformUI/TreeViewColors.cs: -------------------------------------------------------------------------------- 1 | namespace GitScc.PlatformUI 2 | { 3 | using System.Diagnostics; 4 | using Microsoft.VisualStudio.Shell; 5 | 6 | public static class TreeViewColors 7 | { 8 | [DebuggerBrowsable(DebuggerBrowsableState.Never)] 9 | public static object SelectedItemActiveBrushKey 10 | { 11 | get 12 | { 13 | return GetResourceKey("SelectedItemActiveBrushKey", VsBrushes.ActiveCaptionKey); 14 | } 15 | } 16 | 17 | [DebuggerBrowsable(DebuggerBrowsableState.Never)] 18 | public static object SelectedItemActiveTextBrushKey 19 | { 20 | get 21 | { 22 | return GetResourceKey("SelectedItemActiveTextBrushKey", VsBrushes.CaptionTextKey); 23 | } 24 | } 25 | 26 | [DebuggerBrowsable(DebuggerBrowsableState.Never)] 27 | public static object SelectedItemInactiveBrushKey 28 | { 29 | get 30 | { 31 | return GetResourceKey("SelectedItemInactiveBrushKey", VsBrushes.InactiveCaptionKey); 32 | } 33 | } 34 | 35 | [DebuggerBrowsable(DebuggerBrowsableState.Never)] 36 | public static object SelectedItemInactiveTextBrushKey 37 | { 38 | get 39 | { 40 | return GetResourceKey("SelectedItemInactiveTextBrushKey", VsBrushes.InactiveCaptionTextKey); 41 | } 42 | } 43 | 44 | private static object GetResourceKey(string resourceName, object defaultKey) 45 | { 46 | return PlatformColorHelper.GetResourceKey(typeof(TreeViewColors), resourceName) ?? defaultKey; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /GitSccProvider/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GitSccProvider")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GitSccProvider")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.5.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /GitSccProvider/Resources/Compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Compare.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/History.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/History.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/Images_24bit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Images_24bit.bmp -------------------------------------------------------------------------------- /GitSccProvider/Resources/Images_32bit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Images_32bit.bmp -------------------------------------------------------------------------------- /GitSccProvider/Resources/Images_32bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Images_32bit.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Loading.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/Patch-Mode-Blue.xshd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Index:\s 12 | 13 | 14 | == 15 | 16 | 17 | --- 18 | 19 | 20 | \+\+\+ 21 | 22 | 23 | @@ 24 | 25 | 26 | - 27 | 28 | 29 | \+ 30 | 31 | 32 | \s 33 | 34 | 35 | -------------------------------------------------------------------------------- /GitSccProvider/Resources/Patch-Mode-Dark.xshd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Index:\s 15 | 16 | 17 | == 18 | 19 | 20 | --- 21 | 22 | 23 | \+\+\+ 24 | 25 | 26 | @@ 27 | 28 | 29 | - 30 | 31 | 32 | \+ 33 | 34 | 35 | \s 36 | 37 | 38 | -------------------------------------------------------------------------------- /GitSccProvider/Resources/PendingCheckins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/PendingCheckins.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/Product.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Product.ico -------------------------------------------------------------------------------- /GitSccProvider/Resources/Refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Refresh.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/SccGlyphs.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/SccGlyphs.bmp -------------------------------------------------------------------------------- /GitSccProvider/Resources/SccGlyphs2012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/SccGlyphs2012.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/Switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/Switch.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/ToolWindowWithEditorCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/ToolWindowWithEditorCommand.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/ToolWindowWithEditorPackage.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/ToolWindowWithEditorPackage.ico -------------------------------------------------------------------------------- /GitSccProvider/Resources/UndoCheckout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/UndoCheckout.png -------------------------------------------------------------------------------- /GitSccProvider/Resources/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jzoss/Git-Source-Control-Provider/3bb17f71d3eedd32a382bb4b813ff2880b20d35f/GitSccProvider/Resources/git.png -------------------------------------------------------------------------------- /GitSccProvider/SccProviderService.IVsSccPublish.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using Microsoft.VisualStudio.OLE.Interop; 4 | using Microsoft.VisualStudio.Shell; 5 | using Microsoft.VisualStudio.Shell.Interop; 6 | 7 | using Task = System.Threading.Tasks.Task; 8 | namespace GitScc 9 | { 10 | public partial class SccProviderService : IVsSccPublish 11 | { 12 | public async Task BeginPublishWorkflowAsync(CancellationToken cancellationToken) 13 | { 14 | cancellationToken.ThrowIfCancellationRequested(); 15 | 16 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); 17 | 18 | IOleCommandTarget oleCommandTarget = ServiceProvider.GlobalProvider.GetService(typeof(SUIHostCommandDispatcher)) as IOleCommandTarget; 19 | 20 | // Execute the add to source control command. In an actual Source Control Provider, query the status before executing the command. 21 | oleCommandTarget.Exec(GuidList.guidSccProviderCmdSet, CommandId.icmdSccCommandInit, 0, IntPtr.Zero, IntPtr.Zero); 22 | 23 | cancellationToken.ThrowIfCancellationRequested(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GitSccProvider/StatusBar/IStatusBarService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.VisualStudio.Shell; 7 | 8 | namespace GitScc.StatusBar 9 | { 10 | public interface IStatusBarService : IVsSccCurrentBranch, IVsSccChanges, IVsSccCurrentRepository 11 | { 12 | new string BranchName { get; set; } 13 | 14 | new string RepositoryName { get; set; } 15 | 16 | new string BranchDetail { get; set; } 17 | 18 | new string RepositoryDetail { get; set; } 19 | 20 | new string PendingChangeDetail { get; set; } 21 | 22 | 23 | new int PendingChangeCount { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /GitSccProvider/UI/BranchPicker.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |