Исправил ошибку с git - теперь собираем коммиты со всех бранчей.

This commit is contained in:
d.kislov
2020-03-31 19:37:48 +03:00
parent 2b9799b5b7
commit 90912664bf
3 changed files with 51 additions and 34 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.73 1.0.74
+19 -2
View File
@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.ServiceModel.Security;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using JiraTimeBot.Configuration; using JiraTimeBot.Configuration;
@@ -73,9 +74,25 @@ namespace JiraTimeBot.Mercurial
_log?.Trace($" - Не получается сделать pull для репозитория: {directoryInfo.Name} - {ex.Message}"); _log?.Trace($" - Не получается сделать pull для репозитория: {directoryInfo.Name} - {ex.Message}");
} }
} }
var filter = new CommitFilter { SortBy = CommitSortStrategies.Time };
var allCommits = new List<Commit>();
foreach (Commit commit in repo.Commits.QueryBy(filter).Take(200)) var reflog = repo.Refs.Log(repo.Refs.Head);
foreach (var reflogItem in reflog)
{
if (reflogItem.Committer.When.Date != date || reflogItem.Committer.Email != settings.MercurialAuthorEmail)
{
continue;
}
var commit = repo.Lookup<LibGit2Sharp.Commit>(reflogItem.To.Sha);
if (commit != null && allCommits.All(f => f.Sha != commit.Sha))
{
allCommits.Add(commit);
}
}
foreach (Commit commit in allCommits)
{ {
if (cancellationToken.IsCancellationRequested) if (cancellationToken.IsCancellationRequested)
{ {
+31 -31
View File
@@ -1,31 +1,31 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("JiraTimeBot")] [assembly: AssemblyTitle("JiraTimeBot")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JiraTimeBot")] [assembly: AssemblyProduct("JiraTimeBot")]
[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from // to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] [assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //
// Major Version // Major Version
// Minor Version // Minor Version
// Build Number // Build Number
// Revision // Revision
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.73")] [assembly: AssemblyVersion("1.0.74")]
[assembly: AssemblyFileVersion("1.0.73")] [assembly: AssemblyFileVersion("1.0.74")]
[assembly: AssemblyInformationalVersion("1.0.73")] [assembly: AssemblyInformationalVersion("1.0.74")]