private async Task<IEnumerable<ChangesetInfo>> GetSortedChangesetsAsync() { var csfb = new ChangesetFindFilterBuilder(); csfb.AddBranch(Branch); csfb.AddRepositoryString(Repository); var workingDirectory = SessionState.Path.CurrentFileSystemLocation.ProviderPath; var changesets = await Plastic.GetChangesetsAsync(csfb.ToString(), workingDirectory, CancellationToken); return changesets.OrderByDescending(c => c.ChangesetId); }
public async Task GetChangesetsOnBranchAsync() { var workspace = Plastic.GetWorkspaces().First(ws => ws.Name == "libgit2"); var filterBuilder = new ChangesetFindFilterBuilder(); filterBuilder.AddBranch(new[] {"/vmg-no-lookup"}); filterBuilder.AddRepositoryString(new[] {workspace.Repository}); var res = await Plastic.GetChangesetsAsync(filterBuilder.ToString(), Environment.CurrentDirectory); Assert.AreEqual(3, res.Count); }