Exemplo n.º 1
0
 public void Apply(ITfsWorkspaceModifier workspace)
 {
     workspace.Edit(Path);
     workspace.Rename(Path, PathTo, Score);
     var workspaceFile = workspace.GetLocalPath(PathTo);
     _repository.CopyBlob(NewSha, workspaceFile);
 }
Exemplo n.º 2
0
        public void Apply(ITfsWorkspaceModifier workspace)
        {
            workspace.Edit(Path);
            workspace.Rename(Path, PathTo, Score);
            var workspaceFile = workspace.GetLocalPath(PathTo);

            _repository.CopyBlob(NewSha, workspaceFile);
        }
Exemplo n.º 3
0
        void ITfsWorkspaceModifier.Rename(string pathFrom, string pathTo, string score)
        {
            _workspace.Rename(pathFrom, pathTo, score);

            /*
             * // Even though this may have been removed from a directory, we'll
             * // make it look like it wasn't, because TFS doesn't allow these
             * // directories to be removed.
             * // See https://github.com/git-tfs/git-tfs/issues/313
             * _filesRemovedFromTfs.Add(pathFrom);
             * _filesInTfs.Remove(pathFrom.ToLowerInvariant());
             */
            _filesInTfs.Add(pathTo.ToLowerInvariant());
        }
Exemplo n.º 4
0
        void ITfsWorkspaceModifier.Rename(string pathFrom, string pathTo, string score)
        {
            _workspace.Rename(pathFrom, pathTo, score);

            FileOperation pathFromOperation;

            if (_fileOperations.TryGetValue(pathFrom, out pathFromOperation) &&
                pathFromOperation == FileOperation.Edit)
            {
                _fileOperations[pathFrom] = FileOperation.EditAndRenameFrom;
            }
            else
            {
                _fileOperations.Add(pathFrom, FileOperation.RenameFrom);
            }
            _fileOperations.Add(pathTo, FileOperation.RenameTo);
        }