Пример #1
0
 public LogEntry Apply(string lastCommit, IGitTreeModifier treeBuilder, ITfsWorkspace workspace)
 {
     var initialTree = Summary.Remote.Repository.GetObjects(lastCommit);
     var resolver = new PathResolver(Summary.Remote, initialTree);
     var sieve = new ChangeSieve(_changeset, resolver);
     workspace.Get(_changeset.ChangesetId, sieve.GetChangesToFetch());
     foreach (var change in sieve.GetChangesToApply())
     {
         Apply(change, treeBuilder, workspace, initialTree);
     }
     return MakeNewLogEntry();
 }
Пример #2
0
 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();
 }
Пример #3
0
 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();
 }