• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ITfsWorkspace类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ITfsWorkspace的典型用法代码示例。如果您正苦于以下问题:C# ITfsWorkspace类的具体用法?C# ITfsWorkspace怎么用?C# ITfsWorkspace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ITfsWorkspace类属于命名空间,在下文中一共展示了ITfsWorkspace类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Apply

 public void Apply(ITfsWorkspace workspace)
 {
     workspace.Edit(_path);
     workspace.Rename(_path, _pathTo);
     var workspaceFile = workspace.GetLocalPath(_pathTo);
     _repository.GetBlob(_newSha, workspaceFile);
 }
开发者ID:jsmale,项目名称:git-tfs,代码行数:7,代码来源:RenameEdit.cs


示例2: CopyTree

        public LogEntry CopyTree(GitIndexInfo index, ITfsWorkspace workspace)
        {
            var startTime = DateTime.Now;
            var itemsCopied = 0;
            var maxChangesetId = 0;
            var tfsTreeEntries = GetTree().ToArray();
            if (tfsTreeEntries.Length == 0)
            {
                maxChangesetId = _changeset.ChangesetId;
            }
            else
            {
                workspace.Get(_changeset.ChangesetId);
                foreach (var entry in tfsTreeEntries)
                {
                    Add(entry.Item, entry.FullName, index, workspace);
                    maxChangesetId = Math.Max(maxChangesetId, entry.Item.ChangesetId);

                    itemsCopied++;
                    if (DateTime.Now - startTime > TimeSpan.FromSeconds(30))
                    {
                        _stdout.WriteLine("{0} objects created...", itemsCopied);
                        startTime = DateTime.Now;
                    }
                }
            }
            return MakeNewLogEntry(maxChangesetId == _changeset.ChangesetId ? _changeset : _tfs.GetChangeset(maxChangesetId));
        }
开发者ID:JamesDunne,项目名称:git-tfs,代码行数:28,代码来源:TfsChangeset.cs


示例3: Apply

 public void Apply(ITfsWorkspace workspace)
 {
     workspace.Edit(Path);
     workspace.Rename(Path, PathTo, Score);
     var workspaceFile = workspace.GetLocalPath(PathTo);
     _repository.GetBlob(NewSha, workspaceFile);
 }
开发者ID:hammerdr,项目名称:git-tfs,代码行数:7,代码来源:RenameEdit.cs


示例4: Apply

 public LogEntry Apply(string lastCommit, GitIndexInfo index, ITfsWorkspace workspace)
 {
     var initialTree = Summary.Remote.Repository.GetObjects(lastCommit);
     workspace.Get(_changeset);
     foreach (var change in Sort(_changeset.Changes))
     {
         Apply(change, index, workspace, initialTree);
     }
     return MakeNewLogEntry();
 }
开发者ID:runt18,项目名称:git-tfs,代码行数:10,代码来源:TfsChangeset.cs


示例5: Rename

 private void Rename(IChange change, string pathInGitRepo, GitIndexInfo index, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree)
 {
     var oldPath = GetPathInGitRepo(GetPathBeforeRename(change.Item), initialTree);
     if (oldPath != null)
     {
         Delete(oldPath, index, initialTree);
     }
     if (!change.ChangeType.IncludesOneOf(TfsChangeType.Delete))
     {
         Update(change, pathInGitRepo, index, workspace, initialTree);
     }
 }
开发者ID:runt18,项目名称:git-tfs,代码行数:12,代码来源:TfsChangeset.cs


示例6: Apply

 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();
 }
开发者ID:davidalpert,项目名称:git-tfs,代码行数:12,代码来源:TfsChangeset.cs


示例7: Update

 private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree)
 {
     var localPath = workspace.GetLocalPath(change.GitPath);
     if (File.Exists(localPath))
     {
         treeBuilder.Add(change.GitPath, localPath, change.Mode);
     }
     else
     {
         _stdout.WriteLine("Cannot checkout file '{0}' from TFS. Skip it", change.GitPath);
     }
 }
开发者ID:Galilyou,项目名称:git-tfs,代码行数:12,代码来源:TfsChangeset.cs


示例8: Apply

 private void Apply(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree)
 {
     switch (change.Type)
     {
         case ChangeType.Update:
             Update(change, treeBuilder, workspace, initialTree);
             break;
         case ChangeType.Delete:
             Delete(change.GitPath, treeBuilder, initialTree);
             break;
         default:
             throw new NotImplementedException("Unsupported change type: " + change.Type);
     }
 }
开发者ID:Galilyou,项目名称:git-tfs,代码行数:14,代码来源:TfsChangeset.cs


示例9: Apply

 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();
 }
开发者ID:JenasysDesign,项目名称:git-tfs,代码行数:15,代码来源:TfsChangeset.cs


示例10: Apply

 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();
 }
开发者ID:pmiossec,项目名称:git-tfs,代码行数:22,代码来源:TfsChangeset.cs


示例11: Checkin

 private int Checkin(string head, string parent, ITfsWorkspace workspace, CheckinOptions options, string sourceTfsPath)
 {
     PendChangesToWorkspace(head, parent, workspace);
     if (!string.IsNullOrWhiteSpace(sourceTfsPath))
         workspace.Merge(sourceTfsPath, TfsRepositoryPath);
     return workspace.Checkin(options);
 }
开发者ID:huylu,项目名称:git-tfs,代码行数:7,代码来源:GitTfsRemote.cs


示例12: Get

 public void Get(ITfsWorkspace workspace, IEnumerable<IChange> changes)
 {
     workspace.Get(this.ChangesetId, changes);
 }
开发者ID:ThomasWDonnelly,项目名称:git-tfs,代码行数:4,代码来源:TfsHelper.VsFake.cs


示例13: Add

 private void Add(IItem item, string pathInGitRepo, GitIndexInfo index, ITfsWorkspace workspace)
 {
     if (item.DeletionId == 0)
     {
         index.Update(Mode.NewFile, pathInGitRepo, workspace.GetLocalPath(pathInGitRepo));
     }
 }
开发者ID:runt18,项目名称:git-tfs,代码行数:7,代码来源:TfsChangeset.cs


示例14: Checkin

 private long Checkin(string head, TfsChangesetInfo parentChangeset, ITfsWorkspace workspace)
 {
     foreach (var change in Repository.GetChangedFiles(parentChangeset.GitCommit, head))
     {
         change.Apply(workspace);
     }
     return workspace.Checkin();
 }
开发者ID:chrisortman,项目名称:git-tfs,代码行数:8,代码来源:GitTfsRemote.cs


示例15: PendChangesToWorkspace

 private void PendChangesToWorkspace(string head, string parent, ITfsWorkspace workspace)
 {
     foreach (var change in Repository.GetChangedFiles(parent, head))
     {
         change.Apply(workspace);
     }
 }
开发者ID:roend83,项目名称:git-tfs,代码行数:7,代码来源:GitTfsRemote.cs


示例16: PendChangesToWorkspace

 private void PendChangesToWorkspace(string head, TfsChangesetInfo parentChangeset, ITfsWorkspace workspace)
 {
     foreach (var change in Repository.GetChangedFiles(parentChangeset.GitCommit, head))
     {
         change.Apply(workspace);
     }
 }
开发者ID:bretkoppel,项目名称:git-tfs,代码行数:7,代码来源:GitTfsRemote.cs


示例17: Apply

 public void Apply(ITfsWorkspace workspace)
 {
     workspace.Delete(Path);
 }
开发者ID:runt18,项目名称:git-tfs,代码行数:4,代码来源:Delete.cs


示例18: Apply

 public void Apply(ITfsWorkspace workspace)
 {
     workspace.Edit(Path);
     var workspaceFile = workspace.GetLocalPath(Path);
     _repository.CopyBlob(NewSha, workspaceFile);
 }
开发者ID:runt18,项目名称:git-tfs,代码行数:6,代码来源:Modify.cs


示例19: Update

 private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree)
 {
     treeBuilder.Add(change.GitPath, workspace.GetLocalPath(change.GitPath), change.Mode);
 }
开发者ID:davidalpert,项目名称:git-tfs,代码行数:4,代码来源:TfsChangeset.cs


示例20: TfsFileSystem

 public TfsFileSystem(ITfsWorkspace workspace, string path)
     : base(path)
 {
     Workspace = workspace;
 }
开发者ID:monoman,项目名称:NugetCracker,代码行数:5,代码来源:TfsFileSystem.cs



注:本文中的ITfsWorkspace类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ITheme类代码示例发布时间:2022-05-24
下一篇:
C# ITfsChangeset类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap