private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary <string, GitObject> initialTree) { // Assume we cut path at the start, so add it back var tfsPath = change.GitPath; if (!string.IsNullOrEmpty(_cutPath)) { tfsPath = _cutPath + "/" + tfsPath; } var localPath = workspace.GetLocalPath(tfsPath); if (File.Exists(localPath)) { treeBuilder.Add(change.GitPath, localPath, change.Mode); } else { // Fallback to supplied path tfsPath = change.GitPath; localPath = workspace.GetLocalPath(tfsPath); if (File.Exists(localPath)) { treeBuilder.Add(change.GitPath, localPath, change.Mode); } else { Trace.TraceInformation("Cannot checkout file '{0}' from TFS. Skip it", tfsPath); } } }
private void Add(IItem item, string pathInGitRepo, IGitTreeModifier treeBuilder, ITfsWorkspace workspace) { if (item.DeletionId == 0) { treeBuilder.Add(pathInGitRepo, workspace.GetLocalPath(pathInGitRepo), LibGit2Sharp.Mode.NonExecutableFile); } }
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); } }
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 { Trace.TraceInformation("Cannot checkout file '{0}' from TFS. Skip it", change.GitPath); } }
private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary <string, GitObject> initialTree) { var localPath = workspace.GetLocalPath(change.GitPath); if (File.Exists(localPath)) { if (new System.IO.FileInfo(localPath).Length > 50 * 1024 * 1024) { throw new Exception($"File too large for github {localPath}"); } treeBuilder.Add(change.GitPath, localPath, change.Mode); } else { Trace.TraceInformation("Cannot checkout file '{0}' from TFS. Skip it", change.GitPath); } }
private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary<string, GitObject> initialTree) { treeBuilder.Add(change.GitPath, workspace.GetLocalPath(change.GitPath), change.Mode); }
private void Update(ApplicableChange change, IGitTreeModifier treeBuilder, ITfsWorkspace workspace, IDictionary <string, GitObject> initialTree) { treeBuilder.Add(change.GitPath, workspace.GetLocalPath(change.GitPath), change.Mode); }