Compare commits

...
1 Commits
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 };
foreach (Commit commit in repo.Commits.QueryBy(filter).Take(200)) var allCommits = new List<Commit>();
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)
{ {
+3 -3
View File
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
// //
// 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")]