Skip to content

Commit

Permalink
Remove GitHooksLoader and all Esent references
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <stolee@gmail.com>
  • Loading branch information
derrickstolee committed Aug 8, 2019
1 parent b04ff89 commit c13d7a1
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 415 deletions.
13 changes: 0 additions & 13 deletions GVFS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.PreBuild", "GVFS\GVFS.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AB0D9230-3893-4486-8899-F9C871FB5D5F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GitHooksLoader", "GitHooksLoader\GitHooksLoader.vcxproj", "{798DE293-6EDA-4DC4-9395-BE7A71C563E3}"
ProjectSection(ProjectDependencies) = postProject
{A4984251-840E-4622-AD0C-66DFCE2B2574} = {A4984251-840E-4622-AD0C-66DFCE2B2574}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Installer.Windows", "GVFS\GVFS.Installer.Windows\GVFS.Installer.Windows.csproj", "{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}"
ProjectSection(ProjectDependencies) = postProject
{2F63B22B-EE26-4266-BF17-28A9146483A1} = {2F63B22B-EE26-4266-BF17-28A9146483A1}
Expand All @@ -91,7 +86,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.SignFiles", "GVFS\GVFS
ProjectSection(ProjectDependencies) = postProject
{17498502-AEFF-4E70-90CC-1D0B56A8ADF5} = {17498502-AEFF-4E70-90CC-1D0B56A8ADF5}
{32220664-594C-4425-B9A0-88E0BE2F3D2A} = {32220664-594C-4425-B9A0-88E0BE2F3D2A}
{798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
{B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B} = {B8C1DFBA-CAFD-4F7E-A1A3-E11907B5467B}
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
Expand All @@ -113,7 +107,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GVFS.Mac", "GVFS\GVFS\GVFS.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GVFS.Windows", "GVFS\GVFS\GVFS.Windows.csproj", "{32220664-594C-4425-B9A0-88E0BE2F3D2A}"
ProjectSection(ProjectDependencies) = postProject
{798DE293-6EDA-4DC4-9395-BE7A71C563E3} = {798DE293-6EDA-4DC4-9395-BE7A71C563E3}
{5A6656D5-81C7-472C-9DC8-32D071CB2258} = {5A6656D5-81C7-472C-9DC8-32D071CB2258}
{BDA91EE5-C684-4FC5-A90A-B7D677421917} = {BDA91EE5-C684-4FC5-A90A-B7D677421917}
EndProjectSection
Expand Down Expand Up @@ -211,12 +204,6 @@ Global
{A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Mac|x64.ActiveCfg = Release|x64
{A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Windows|x64.ActiveCfg = Release|x64
{A4984251-840E-4622-AD0C-66DFCE2B2574}.Release.Windows|x64.Build.0 = Release|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Mac|x64.ActiveCfg = Debug|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Windows|x64.ActiveCfg = Debug|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Debug.Windows|x64.Build.0 = Debug|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Mac|x64.ActiveCfg = Release|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Windows|x64.ActiveCfg = Release|x64
{798DE293-6EDA-4DC4-9395-BE7A71C563E3}.Release.Windows|x64.Build.0 = Release|x64
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Mac|x64.ActiveCfg = Debug|x64
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Windows|x64.ActiveCfg = Debug|x64
{3AB4FB1F-9E23-4CD8-BFAC-8A2221C8F893}.Debug.Windows|x64.Build.0 = Debug|x64
Expand Down
18 changes: 7 additions & 11 deletions GVFS/GVFS.Common/DiskLayoutUpgrades/DiskLayoutUpgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,23 +310,19 @@ private static bool TryGetDiskLayoutVersion(
out int minorVersion,
out string error)
{
majorVersion = 0;
minorVersion = 0;

string dotGVFSPath = Path.Combine(enlistmentRoot, GVFSPlatform.Instance.Constants.DotGVFSRoot);

if (!GVFSPlatform.Instance.DiskLayoutUpgrade.TryParseLegacyDiskLayoutVersion(dotGVFSPath, out majorVersion))
if (!RepoMetadata.TryInitialize(tracer, dotGVFSPath, out error))
{
if (!RepoMetadata.TryInitialize(tracer, dotGVFSPath, out error))
{
majorVersion = 0;
return false;
}
majorVersion = 0;
return false;
}

if (!RepoMetadata.Instance.TryGetOnDiskLayoutVersion(out majorVersion, out minorVersion, out error))
{
return false;
}
if (!RepoMetadata.Instance.TryGetOnDiskLayoutVersion(out majorVersion, out minorVersion, out error))
{
return false;
}

error = null;
Expand Down
1 change: 0 additions & 1 deletion GVFS/GVFS.Common/IDiskLayoutUpgradeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ public interface IDiskLayoutUpgradeData
{
DiskLayoutUpgrade[] Upgrades { get; }
DiskLayoutVersion Version { get; }
bool TryParseLegacyDiskLayoutVersion(string dotGVFSPath, out int majorVersion);
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using GVFS.Common;
using GVFS.DiskLayoutUpgrades;
using Microsoft.Isam.Esent.Collections.Generic;
using System;
using System.IO;

namespace GVFS.Platform.Windows.DiskLayoutUpgrades
{
public class WindowsDiskLayoutUpgradeData : IDiskLayoutUpgradeData
{
public const string DiskLayoutEsentVersionKey = "DiskLayoutVersion";
public const string EsentRepoMetadataName = "RepoMetadata";

public DiskLayoutUpgrade[] Upgrades
{
get
Expand All @@ -25,35 +19,5 @@ public DiskLayoutUpgrade[] Upgrades
currentMajorVersion: 0,
currentMinorVersion: 0,
minimumSupportedMajorVersion: 0);

public bool TryParseLegacyDiskLayoutVersion(string dotGVFSPath, out int majorVersion)
{
string repoMetadataPath = Path.Combine(dotGVFSPath, EsentRepoMetadataName);
majorVersion = 0;
if (Directory.Exists(repoMetadataPath))
{
try
{
using (PersistentDictionary<string, string> oldMetadata = new PersistentDictionary<string, string>(repoMetadataPath))
{
string versionString = oldMetadata[DiskLayoutEsentVersionKey];
if (!int.TryParse(versionString, out majorVersion))
{
return false;
}
}
}
catch
{
return false;
}
}
else
{
return false;
}

return true;
}
}
}
15 changes: 0 additions & 15 deletions GVFS/GVFS.Platform.Windows/GVFS.Platform.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,6 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="Esent.Collections, Version=1.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Database.Collections.Generic.1.9.4\lib\net40\Esent.Collections.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Esent.Interop, Version=1.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\ManagedEsent.1.9.4\lib\net40\Esent.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Esent.Isam, Version=1.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Database.Isam.1.9.4\lib\net40\Esent.Isam.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
Expand Down
153 changes: 0 additions & 153 deletions GitHooksLoader/GitHooksLoader.cpp

This file was deleted.

Loading

0 comments on commit c13d7a1

Please sign in to comment.