public Stream( string name, ICommitCollection commits) { Name = name; Commits = commits; }
private static void AssertEnumerationOfCommitsInRepo(Repository repo, Func <Repository, Filter> filterBuilder, IEnumerable <string> abbrevIds) { ICommitCollection commits = repo.Commits.QueryBy(filterBuilder(repo)); IEnumerable <string> commitShas = commits.Select(c => c.Id.ToString(7)).ToArray(); Assert.Equal(abbrevIds, commitShas); }
private static void AssertEnumerationOfCommits(Func <Repository, Filter> filterBuilder, IEnumerable <string> abbrevIds) { using (var repo = new Repository(Constants.BareTestRepoPath)) { ICommitCollection commits = repo.Commits.QueryBy(filterBuilder(repo)); IEnumerable <string> commitShas = commits.Select(c => c.Id.ToString(7)).ToArray(); CollectionAssert.AreEqual(abbrevIds, commitShas); } }
public Stream( string name, string createdAt, string updatedAt, ICommitCollection commits) { Name = name; CreatedAt = createdAt; UpdatedAt = updatedAt; Commits = commits; }
public static List <ICommitItem> ToCommitItems(this ICommitCollection list, Uri path, IMediatorService mediator, int secondsToTimeout, Action <Commit, ObjectId, int> onViewChangeDetails, string repoName) { var result = new List <ICommitItem>(); list.ToList().ForEach(i => { var gitItem = new CommitItem() { Author = string.Format("{0} <{1}>", i.Committer.Name, i.Committer.Email), Date = i.Committer.When.DateTime, LogMessage = i.Message, Revision = i.Id.ToString(), // TODO: Need to provide the user a way to see the list of changes, change types, and when they click, a diff ItemChanges = null, // i.Tree != null ? i.Tree.ToItemsChanged(i, path, mediator, secondsToTimeout, onViewChangeDetails) : null, RepoPath = path, RepositoryName = repoName }; result.Add(gitItem); }); return(result); }