Skip to content

Commit

Permalink
Revert LibGit2Sharp update
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmelsayed committed Jan 19, 2017
1 parent 316c11d commit 9703a15
Show file tree
Hide file tree
Showing 17 changed files with 205 additions and 204 deletions.
10 changes: 5 additions & 5 deletions Kudu.Client/app.config
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
6 changes: 3 additions & 3 deletions Kudu.Console/app.config
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="WaitForDebuggerOnStart" value="false" />
<add key="WaitForDebuggerOnStart" value="false"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down
8 changes: 4 additions & 4 deletions Kudu.Core.Test/app.config
Expand Up @@ -3,13 +3,13 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
11 changes: 5 additions & 6 deletions Kudu.Core/Kudu.Core.csproj
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props')" />
<Import Project="..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Kudu.sln))\Build\Kudu.targets" />
<PropertyGroup>
<ProjectGuid>{5320177C-725A-44BD-8FA6-F88D9725B46C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Kudu.Core</RootNamespace>
<AssemblyName>Kudu.Core</AssemblyName>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<NuGetPackageImportStamp>2da09ae7</NuGetPackageImportStamp>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -18,8 +17,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="LibGit2Sharp, Version=0.23.1.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
<HintPath>..\packages\LibGit2Sharp.0.23.1\lib\net40\LibGit2Sharp.dll</HintPath>
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Mercurial.Net, Version=1.1.1.607, Culture=neutral, PublicKeyToken=9e2fabf3af85dba9, processorArchitecture=MSIL">
Expand Down Expand Up @@ -445,7 +444,7 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.26\build\Microsoft.Diagnostics.Tracing.EventRegister.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.26\build\Microsoft.Diagnostics.Tracing.EventRegister.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props'))" />
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props'))" />
</Target>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
29 changes: 16 additions & 13 deletions Kudu.Core/SourceControl/Git/LibGit2SharpRepository.cs
Expand Up @@ -151,7 +151,7 @@ public void AddFile(string path)
{
using (var repo = new LibGit2Sharp.Repository(RepositoryPath))
{
LibGit2Sharp.Commands.Stage(repo, path);
repo.Stage(path);
}
}

Expand All @@ -170,13 +170,16 @@ public bool Commit(string message, string authorName, string emailAddress)
return false;
}

LibGit2Sharp.Commands.Stage(repo, changes);

authorName = string.IsNullOrWhiteSpace(authorName) ? string.Empty : authorName;
emailAddress = string.IsNullOrWhiteSpace(emailAddress) ? string.Empty : emailAddress;

var author = new Signature(authorName, emailAddress, DateTimeOffset.UtcNow);
repo.Commit(message, author, author);
repo.Stage(changes);
if (string.IsNullOrWhiteSpace(authorName) ||
string.IsNullOrWhiteSpace(emailAddress))
{
repo.Commit(message);
}
else
{
repo.Commit(message, new Signature(authorName, emailAddress, DateTimeOffset.UtcNow));
}
return true;
}
}
Expand All @@ -185,7 +188,7 @@ public void Update(string id)
{
using (var repo = new LibGit2Sharp.Repository(RepositoryPath))
{
LibGit2Sharp.Commands.Checkout(repo, id, new CheckoutOptions { CheckoutModifiers = CheckoutModifiers.Force });
repo.Checkout(id, new CheckoutOptions { CheckoutModifiers = CheckoutModifiers.Force });
}
}

Expand Down Expand Up @@ -222,7 +225,7 @@ public void FetchWithoutConflict(string remoteUrl, string branchName)
using (tracer.Step("LibGit2SharpRepository Fetch"))
{
// This will only retrieve the "master"
LibGit2Sharp.Commands.Fetch(repo, remote.Name, remote.RefSpecs.Select(r => r.Specification), new FetchOptions(), "LibGit2SharpRepository Fetch");
repo.Network.Fetch(remote);
}

using (tracer.Step("LibGit2SharpRepository Update"))
Expand Down Expand Up @@ -297,7 +300,7 @@ public void CreateOrResetBranch(string branchName, string startPoint)
if (string.IsNullOrWhiteSpace(startPoint))
{
var branch = repo.GetOrCreateBranch(branchName);
LibGit2Sharp.Commands.Checkout(repo, branch);
repo.Checkout(branch);
}
else
{
Expand All @@ -307,7 +310,7 @@ public void CreateOrResetBranch(string branchName, string startPoint)
throw new LibGit2Sharp.NotFoundException(string.Format("Start point \"{0}\" for reset was not found.", startPoint));
}
var branch = repo.GetOrCreateBranch(branchName);
LibGit2Sharp.Commands.Checkout(repo, branch);
repo.Checkout(branch);
repo.Reset(ResetMode.Hard, commit);
}
}
Expand Down Expand Up @@ -351,7 +354,7 @@ public IEnumerable<string> ListFiles(string path, SearchOption searchOption, par

using (var repo = new LibGit2Sharp.Repository(RepositoryPath))
{
var files = repo.Diff.Compare<TreeChanges>(null, DiffTargets.Index, lookupList)
var files = repo.Diff.Compare<TreeChanges>(null, DiffTargets.Index, lookupList, compareOptions: new CompareOptions() { IncludeUnmodified = true, Similarity = SimilarityOptions.None })
.Select(d => Path.Combine(repo.Info.WorkingDirectory, d.Path))
.Where(p => p.StartsWith(path, StringComparison.OrdinalIgnoreCase));

Expand Down
12 changes: 6 additions & 6 deletions Kudu.Core/app.config
Expand Up @@ -3,17 +3,17 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Web.XmlTransform" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
<assemblyIdentity name="Microsoft.Web.XmlTransform" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
3 changes: 1 addition & 2 deletions Kudu.Core/packages.config
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.9.1.8" targetFramework="net45" />
<package id="LibGit2Sharp" version="0.23.1" targetFramework="net46" />
<package id="LibGit2Sharp.NativeBinaries" version="1.0.164" targetFramework="net46" />
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net45" />
<package id="Mercurial.Net" version="1.1.1.607" targetFramework="net46" />
<package id="Microsoft.AspNetCore.Cryptography.Internal" version="1.0.0" targetFramework="net46" />
<package id="Microsoft.AspNetCore.DataProtection" version="1.0.0" targetFramework="net46" />
Expand Down
20 changes: 10 additions & 10 deletions Kudu.FunctionalTests/App.config
Expand Up @@ -2,32 +2,32 @@
<configuration>
<appSettings>
<!-- Uncomment out this line to reuse the same site for all functional tests, which runs much faster -->
<add key="SiteReusedForAllTests" value="TestRunnerSite" />
<add key="SiteReusedForAllTests" value="TestRunnerSite"/>
<!-- Update to change the maximum number of sites created on failure in reuse site mode -->
<add key="MaxSiteNameIndex" value="1" />
<add key="MaxSiteNameIndex" value="1"/>
<!-- whether to retry on failure -->
<add key="DisableRetry" value="true" />
<add key="DisableRetry" value="true"/>
<!-- By default we use App Pool Identity, but it has caused strange errors that are not well understood -->
<add key="UseNetworkServiceIdentity" value="true" />
<add key="UseNetworkServiceIdentity" value="true"/>
</appSettings>
<system.net>
<connectionManagement>
<clear />
<add address="*" maxconnection="10" />
<clear/>
<add address="*" maxconnection="10"/>
</connectionManagement>
</system.net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
12 changes: 6 additions & 6 deletions Kudu.Performance/app.config
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="xunit" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.0.1549" newVersion="1.8.0.1549" />
<assemblyIdentity name="xunit" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.8.0.1549" newVersion="1.8.0.1549"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
8 changes: 4 additions & 4 deletions Kudu.Services.Test/app.config
Expand Up @@ -3,13 +3,13 @@
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0" />
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="5.1.0.0-5.2.2.0" newVersion="5.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>

0 comments on commit 9703a15

Please sign in to comment.