public LogEntry Apply(string lastCommit, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree, Action<Exception> ignorableErrorHandler) { if (initialTree.Empty()) Summary.Remote.Repository.GetObjects(lastCommit, initialTree); var resolver = new PathResolver(Summary.Remote, initialTree); var sieve = new ChangeSieve(_changeset, resolver); _changeset.Get(workspace, sieve.GetChangesToFetch(), ignorableErrorHandler); foreach (var change in sieve.GetChangesToApply()) { ignorableErrorHandler.Catch(() => { Apply(change, treeBuilder, workspace, initialTree); }); } return MakeNewLogEntry(); }
public LogEntry Apply(string lastCommit, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree, Action<Exception> ignorableErrorHandler) { if (initialTree.Empty()) Summary.Remote.Repository.GetObjects(lastCommit, initialTree); var remoteRelativeLocalPath = GetPathRelativeToWorkspaceLocalPath(workspace); var resolver = new PathResolver(Summary.Remote, remoteRelativeLocalPath, initialTree); var sieve = new ChangeSieve(_changeset, resolver); if (sieve.RenameBranchCommmit) { IsRenameChangeset = true; } _changeset.Get(workspace, sieve.GetChangesToFetch(), ignorableErrorHandler); var forceGetChanges = lastCommit == null; foreach (var change in sieve.GetChangesToApply(forceGetChanges)) { ignorableErrorHandler.Catch(() => { Apply(change, treeBuilder, workspace, initialTree); }); } return MakeNewLogEntry(); }