Esempio n. 1
0
        private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
        {
            LogEntry result = null;

            WithTemporaryIndex(
                () => GitIndexInfo.Do(Repository, index => result = changeset.CopyTree(index)));
            WithTemporaryIndex(
                () => result.Tree = Repository.CommandOneline("write-tree"));
            if (!String.IsNullOrEmpty(lastCommit))
            {
                result.CommitParents.Add(lastCommit);
            }
            return(result);
        }
Esempio n. 2
0
        private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
        {
            LogEntry result = null;

            WithTemporaryIndex(() => Tfs.WithWorkspace(WorkingDirectory, this, changeset.Summary, workspace => {
                GitIndexInfo.Do(Repository, index => result = changeset.CopyTree(index, workspace));
                result.Tree = Repository.CommandOneline("write-tree");
            }));
            if (!String.IsNullOrEmpty(lastCommit))
            {
                result.CommitParents.Add(lastCommit);
            }
            return(result);
        }
Esempio n. 3
0
        private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
        {
            LogEntry result = null;

            WithWorkspace(changeset.Summary, workspace => {
                var treeBuilder = workspace.Remote.Repository.GetTreeBuilder(null);
                result          = changeset.CopyTree(treeBuilder, workspace);
                result.Tree     = treeBuilder.GetTree();
            });
            if (!String.IsNullOrEmpty(lastCommit))
            {
                result.CommitParents.Add(lastCommit);
            }
            return(result);
        }
Esempio n. 4
0
 private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
 {
     LogEntry result = null;
     WithTemporaryIndex(
         () => GitIndexInfo.Do(Repository, index => result = changeset.CopyTree(index)));
     WithTemporaryIndex(
         () => result.Tree = Repository.CommandOneline("write-tree"));
     if (!String.IsNullOrEmpty(lastCommit)) result.CommitParents.Add(lastCommit);
     return result;
 }
Esempio n. 5
0
 private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
 {
     LogEntry result = null;
     WithWorkspace(changeset.Summary, workspace => {
         var treeBuilder = workspace.Remote.Repository.GetTreeBuilder(null);
         result = changeset.CopyTree(treeBuilder, workspace);
         result.Tree = treeBuilder.GetTree();
     });
     if (!String.IsNullOrEmpty(lastCommit)) result.CommitParents.Add(lastCommit);
     return result;
 }
Esempio n. 6
0
 private LogEntry CopyTree(string lastCommit, ITfsChangeset changeset)
 {
     LogEntry result = null;
     WithTemporaryIndex(() => Tfs.WithWorkspace(WorkingDirectory, this, changeset.Summary, workspace => {
         GitIndexInfo.Do(Repository, index => result = changeset.CopyTree(index, workspace));
         result.Tree = Repository.CommandOneline("write-tree");
     }));
     if (!String.IsNullOrEmpty(lastCommit)) result.CommitParents.Add(lastCommit);
     return result;
 }