TFS Visual Studio 2010中,某些类型的“合并工具选项”中没有显示“合并更改”。如何启用它?

时间:2018-10-22 07:43:02

标签: visual-studio tfs version-control

当存在合并冲突时,某些文件不提供合并工具选项,而其他页面类型则可用。检查下面的两个屏幕截图

Merge Changes in merge tool is not avaliable for aspx page type

merge changes in merge tool is avaliable for sln

1 个答案:

答案 0 :(得分:0)

只需为文件类型const checkSumExist = arr => { for(let i = 0; i < arr.length; i++) { for(let j = i + 1; j < arr.length; j++) { if(arr.includes(arr[i] + arr[j])) return true; } } return false; } 启用选项“ size_t ReadAllChars(char const* fileName, char **ppDestination) { //Check inputs if(!filename || !ppDestination) { //Handle errors; return 0; } //open file for reading FILE *pFile = fopen(fileName, "rb"); //check file successfully opened if(!pFile) { //Handle error return 0; } //Seek to end of file (to get file length) if(_fseeki64(pFile, 0, SEEK_END)) { //Handle error return 0; } //Get file length size_t fileLength = _ftelli64(pFile); if(fileLength == -1) { //Handle error return 0; } //Seek back to start of file if(_fseeki64(pFile, 0, SEEK_SET)) { //Handle error return 0; } //Allocate memory to store entire contents of file char *pRawSource = (char*)malloc(fileLength); //Check that allocation succeeded if(!pRawSource) { //Handle error //return 0; } //Read entire file if(fread(pRawSource, 1, fileLength, pFile) != fileLength)) { //Handle error fclose(pFile); free(pRawSource); return 0; } //Close file fclose(pFile); //count spaces size_t spaceCount = 0; for(size_t i = 0; i < fileLength; i++) { if(pRawSource[i] == ' ') ++spaceCount; } //allocate space for file contents not including spaces (plus a null terminator) size_t resultLength = fileLength - spaceCount; char *pResult = (char*)malloc(resultLength + 1) //Check allocation succeeded if(!pResult) { //Handle error free(pRawSource); return 0; } //Null terminate result pResult[resultLength] = NULL; //copy all characters except space into pResult char *pNextTarget = pResult; for(size_t i = 0; i < fileLength; i++) { if(pRawSource[i] != ' ') { *pNextTarget = pRawSource[i]; ++pNextTarget; } } //Free temporary buffer free(pRawSource); *ppDestination = pResult; return resultLength; } ”即可。

例如在VS 2015中(在我这边, no vs 2010,应该与vs 2015 相似):

  1. 打开Visual Studio->连接到TFS服务器
  2. Enable file merging and multiple check-out-> *.aspx-> Team
  3. 选择Team Project Collection Settings-> Source Control...
  4. 确保已添加文件类型Asp.net Files并启用/选中了选项“ Edit
  5. 关闭并重新启动 Visual Studio,然后再试一次,*.aspx选项将立即显示。

enter image description here