Skip to content

Commit

Permalink
Implement a naive backflow conflict resolution strategy (#4343)
Browse files Browse the repository at this point in the history
  • Loading branch information
premun authored Jan 21, 2025
1 parent 3c5ee43 commit c64a725
Show file tree
Hide file tree
Showing 15 changed files with 548 additions and 510 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Task<GitFileContentContainer> UpdateDependencyFiles(
IEnumerable<DependencyDetail> itemsToUpdate,
SourceDependency? sourceDependency,
string repoUri,
string branch,
string? branch,
IEnumerable<DependencyDetail> oldDependencies,
SemanticVersion? incomingDotNetSdkVersion);

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Darc/DarcLib/Local.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task AddDependencyAsync(DependencyDetail dependency)
/// Updates existing dependencies in the dependency files
/// </summary>
/// <param name="dependencies">Dependencies that need updates.</param>
public async Task UpdateDependenciesAsync(List<DependencyDetail> dependencies, IRemoteFactory remoteFactory, IGitRepoFactory gitRepoFactory, IBarApiClient barClient)
public async Task UpdateDependenciesAsync(List<DependencyDetail> dependencies, IRemoteFactory remoteFactory, IGitRepoFactory gitRepoFactory, IBasicBarClient barClient)
{
// Read the current dependency files and grab their locations so that nuget.config can be updated appropriately.
// Update the incoming dependencies with locations.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Darc/DarcLib/LocalGitClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public LocalGitClient(
_logger = logger;
}

public async Task<string> GetFileContentsAsync(string relativeFilePath, string repoPath, string branch)
public async Task<string> GetFileContentsAsync(string relativeFilePath, string repoPath, string? branch)
{
// Load non-working-tree version
if (!string.IsNullOrEmpty(branch))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Threading;
using System.Threading.Tasks;
using LibGit2Sharp;
using Microsoft.DotNet.DarcLib.Conflicts;
using Microsoft.DotNet.DarcLib.Helpers;
using Microsoft.DotNet.DarcLib.Models.VirtualMonoRepo;
using Microsoft.DotNet.ProductConstructionService.Client.Models;
Expand Down Expand Up @@ -61,10 +60,9 @@ public PcsVmrBackFlower(
ILocalLibGit2Client libGit2Client,
ICoherencyUpdateResolver coherencyUpdateResolver,
IAssetLocationResolver assetLocationResolver,
IBackFlowConflictResolver conflictResolver,
IFileSystem fileSystem,
ILogger<VmrCodeFlower> logger)
: base(vmrInfo, sourceManifest, dependencyTracker, dependencyFileManager, vmrCloneManager, repositoryCloneManager, localGitClient, localGitRepoFactory, versionDetailsParser, vmrPatchHandler, workBranchFactory, basicBarClient, libGit2Client, coherencyUpdateResolver, assetLocationResolver, conflictResolver, fileSystem, logger)
: base(vmrInfo, sourceManifest, dependencyTracker, dependencyFileManager, vmrCloneManager, repositoryCloneManager, localGitClient, localGitRepoFactory, versionDetailsParser, vmrPatchHandler, workBranchFactory, basicBarClient, libGit2Client, coherencyUpdateResolver, assetLocationResolver, fileSystem, logger)
{
_sourceManifest = sourceManifest;
_dependencyTracker = dependencyTracker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.DotNet.DarcLib.Conflicts;
using Microsoft.DotNet.DarcLib.Helpers;
using Microsoft.DotNet.DarcLib.Models.VirtualMonoRepo;
using Microsoft.DotNet.ProductConstructionService.Client.Models;
Expand Down Expand Up @@ -46,20 +45,15 @@ public PcsVmrForwardFlower(
IVmrUpdater vmrUpdater,
IVmrDependencyTracker dependencyTracker,
IVmrCloneManager vmrCloneManager,
IDependencyFileManager dependencyFileManager,
IRepositoryCloneManager repositoryCloneManager,
ILocalGitClient localGitClient,
ILocalLibGit2Client libGit2Client,
IBasicBarClient basicBarClient,
ILocalGitRepoFactory localGitRepoFactory,
IVersionDetailsParser versionDetailsParser,
IProcessManager processManager,
ICoherencyUpdateResolver coherencyUpdateResolver,
IAssetLocationResolver assetLocationResolver,
IForwardFlowConflictResolver conflictResolver,
IFileSystem fileSystem,
ILogger<VmrCodeFlower> logger)
: base(vmrInfo, sourceManifest, vmrUpdater, dependencyTracker, vmrCloneManager, dependencyFileManager, localGitClient, libGit2Client, basicBarClient, localGitRepoFactory, versionDetailsParser, processManager, coherencyUpdateResolver, assetLocationResolver, conflictResolver, fileSystem, logger)
: base(vmrInfo, sourceManifest, vmrUpdater, dependencyTracker, vmrCloneManager, localGitClient, basicBarClient, localGitRepoFactory, versionDetailsParser, processManager, fileSystem, logger)
{
_sourceManifest = sourceManifest;
_dependencyTracker = dependencyTracker;
Expand Down
Loading

0 comments on commit c64a725

Please sign in to comment.