Skip to content

Commit

Permalink
Support changesets deleting branches at the same time as merging them…
Browse files Browse the repository at this point in the history
… to another branch
  • Loading branch information
jnm2 committed May 8, 2023
1 parent f1abdf0 commit 675ac4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TfvcMigrator/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.CommandLine;
using System.CommandLine.NamingConventionBinder;
using System.Globalization;
using System.Linq;
using System.Text;
using LibGit2Sharp;
using Microsoft.TeamFoundation.SourceControl.WebApi;
Expand Down Expand Up @@ -520,7 +521,8 @@ private static void ReportProgress(int changeset, int total, TimedProgress timed
keySelector: mappingByBranch => mappingByBranch.Branch,
dependenciesSelector: mappingByBranch => additionalParents
.Where(b => b.Branch == mappingByBranch.Branch)
.Select(b => b.ParentBranch))
.Select(b => b.ParentBranch)
.Where(branchMappings.ContainsKey)) // If the parent branch is also being deleted in the same commit, it doesn't affect the relative order
.ToImmutableArray();

yield return new MappingState(
Expand Down

0 comments on commit 675ac4c

Please sign in to comment.