TFS가 최신 버전이 아닌 이유는 무엇입니까?
왜 TFS가 최신 작업을 지속적으로 얻지 못하는 이유는 무엇입니까?기능이 철저히 테스트되었을 것이라고 생각했을 것입니다.내가해야 할 일은 특정 버전을 얻은 다음 덮어 쓸 수있는 파일을 확인하고 모든 파일을 덮어 쓰는 것입니다.로컬 설정이 엉망입니까? 아니면이 작업을 수행합니까?
TFS는 "최신 정보 얻기"의 기능을 재정의했습니다. TFS 용어로, Get Latest는 최신 버전의 파일을 가져 오지만 서버가 이미 작업 공간에 있다고 생각하는 파일은 무시합니다. 나에게 그리고 지구상의 다른 모든 사람들에게 잘못되었습니다.이 링크를 참조하십시오 :
원하는 작업을 수행 할 수있는 유일한 방법은 특정 버전 가져 오기를 수행 한 다음 "덮어 쓰기 ..."상자를 모두 선택하는 것입니다.
때로는
Get specific version
두 확인란
을 모두 선택해 도 최신 파일이 표시되지 않습니다. 파일을 변경 한 후 최신 버전을 다시 가져 와서 변경 사항을 취소하려고합니다. 글쎄 ... 그게
Undo pending changes
목적이 아니라 목적입니다
Get specific version
.만약에 의심이된다면:
- 파일에서 보류중인 체크인 실행 취소
- 나중에 비교하여 파일이 예상 버전과 일치하는지 확인하십시오.
- 나중에 전체 프로젝트에서 재귀적인 '비교'를 실행하여 다른 점이 무엇인지 확인하십시오.
- 보류중인 변경 사항 창을 주시하고 때로는 호환되지 않는 보류중인 변경 사항을 해결하기 위해 '서버 버전 가져 오기'를 확인해야 할 수도 있습니다.
그리고 이것은 내가 방금 발견 한 가장 좋아하는 것입니다.
- 다음
과 같은 메시지가 있는지 창을 주시 하십시오.경고-편집 대기 중이므로 R : \ TFS-PROJECTS \ www.example.com \ ExampleMVC \ Example MVC \ Example MVC.csproj를 새로 고칠 수 없습니다.Output
이
중요한
메시지는 출력 창에 나타납니다. 다른 알림은 없습니다! 보류중인 변경 사항이없고 방금 명시 적으로 요청한 파일이 검색되지 않았다는 다른 대화 상자 메시지가 없습니다! 그리고 예-
Undo pending changes
파일을 실행 하고 가져 와서이 문제를 해결 하십시오.
Perforce와 같은 다른 소스 제어 공급자와 마찬가지로 TFS는 시스템이 마지막으로 얻은 버전이 무엇인지 알고 있으므로 최신 버전을 "x 이후로 변경"으로 바꿉니다. 규칙에 따라 연주하고 실제로 편집하기 전에 사물을 확인하면 문제를 혼동하지 않고 "최신 정보를 얻는다"는 말 그대로 작동합니다.보시다시피, 훨씬 더 많은 대역폭을 사용하지만 SourceSafe가 사용했던 방식에 가깝게 동작하는 모든 것을 재평가하도록 강제 할 수 있습니다.
어떻게 작동하지 않는지에 대한 예없이 문장에 응답하기는 어렵지만 TFVC (TFS 2012 이전의 메커니즘 인 "서버 작업 공간"모드)
가 로컬 파일 시스템의 상태를 검사하지 않는다는
것을 이해하는 것이 중요합니다 . TFVC 서버 작업 공간은 "체크 아웃 편집 체크인"유형의 시스템으로, 의도적으로 설계된 작업 공간의 상태를 결정하는 데 필요한 파일 I / O의 양을 크게 줄이려는 의도적 인 결정입니다. 대신 작업 공간 정보가 서버에 저장됩니다.이를 통해 TFVC 서버 작업 공간을
매우
큰 코드베이스로 매우 효율적 으로 확장 할 수 있습니다. Visual Studio 또는 Windows 소스 트리와 같은 멀티 기가 바이트 코드 기반 인 경우 클라이언트는 로컬 파일 시스템을 스캔 할 필요가 없습니다. TFS와의 계약은 파일을 편집 할 때 명시 적으로 체크 아웃합니다.당신은 할 것으로 예상된다
없습니다
쓰기 전용으로 파일을 표시하고 먼저 체크 아웃 명시 적없이 변경합니다. 이 경로를 아래로 갈 경우, 서버는 파일에 변경 한 것을 알고하지 않고 수행하는 작업을 할 것이다 "최신 오기"
아니
당신이 만든 것을 서버에게하지 않았기 때문에, 해당 지역의 작업 공간을 업데이트 변화.당신이 경우에
할
이 메커니즘을 파괴 다음은 사용할 수있는
tfpt reconcile
로컬로 만든 것을 변경은 해당 지역의 작업 공간을 검사하는 명령을 사용합니다.
"특정 버전 가져 오기"를 사용하고 "강제"및 "덮어 쓰기"옵션을 선택하는 경우, TFS가 자신을 다치게하지 않도록 구현 한 모든 시행을 무시하는 습관이있을 수 있습니다.
TFVC 로컬 작업 공간을 고려해야합니다.TFVC 로컬 작업 영역은 "편집 병합 커밋은"을 제공하면 것을 의미 버전 관리 시스템의 종류
하지 않는
명시 적으로 편집하기 전에 파일을 확인하고 그들이 필요
하지 않습니다
읽기 전용에 디스크. 대신 파일을 편집하기 만하면 클라이언트가 파일 시스템을 스캔하고 변경 사항을 확인한 후이를 보류중인 변경 사항으로 표시합니다.TFVC 로컬 작업 영역
은
훨씬 더 나은 워크 플로우를 제공하므로 세밀한 권한 제어가 필요없는 소규모 프로젝트에 권장 됩니다. 온라인 상태 일 필요는 없으며 편집하기 전에 파일을 명시 적으로 체크 아웃 할 필요가 없습니다.TFVC 로컬 작업 공간은 TFS 2012에서 기본값이며, 사용 가능하지 않은 경우 서버 관리자에게 문의해야합니다. 매우 큰 코드베이스 또는 엄격한 감사 요구 사항이있는 조직은 TFVC 로컬 작업 영역을 사용하지 못할 수 있습니다.Eric Sink의 훌륭한 책인
은 checkout-edit-checkin과 edit-merge-commit 시스템의 차이점과 하나가 다른 것보다 더 적합한 경우를 간략하게 설명합니다.
이 책은 또한 TFVC 서버 작업 영역 및 TFVC 지역 작업 공간의 차이점에 대한 우수한 정보를 제공합니다. MSDN 설명서 및 블로그에서도 자세한 정보를 제공합니다.
TFS (Team Foundation Server)는 $ TF라는 숨겨진 디렉토리에서 로컬 사본을 추적합니다. "최신 버전 가져 오기"를 발행하면 TFS가이 폴더를보고 날씨가 최신 사본인지 확인합니다. 그렇다면 최신 사본을 다운로드하지 않습니다. 원본 파일이 있는지 여부는 중요하지 않습니다. 실제로 전체 폴더를 삭제했을 수 있습니다 (내 경우와 같이) TFS는 실제 파일을 보지 않고 변경 사항을 기록하는 숨겨진 디렉토리를 찾기 때문에 최신 사본을 가져 오지 않습니다. 이 디자인의 결점은 시스템 외부에서 수행 된 작업은 TFS에 기록되지 않는다는 것입니다. 예를 들어, Windows 탐색기로 이동하여 폴더 나 파일을 삭제하면 TFS가이를 인식하지 못할 수 있습니다. 완전히 장님입니다. 적어도 나는 Windows 가이 파일을 삭제할 수는 없을 것이라고 기대하지만 그렇지 않습니다!
One way to enforce the latest copy is to delete the hidden $TF folder manually. To do that, go to command prompt and navigate to the root folder where you project was checked out and issue this command
rd/s $tf // remove $TF folder and everything inside it
If you want to just check the hidden folder, you can do it using
dir /ah // display hidden files and folders
Note: If you do it, the tf will think you do not have any local copy even though you have it in files and it will sync up everything again.
Caution: Use this method at your own risk. Please do not use it on critical work.
"Get latest version" by default will only download the files that have changed on the server since the last time you ran "Get latest version". TFS keeps track of the files you download so it doesn't spend time downloading the same version of the files again. If you are modifying the files outside of Visual Studio, this can cause the consistency problems it sounds like you are seeing.
Unfortunately, there has to be one or more bugs in TFS 2008, since this problem regularly crop up on developer machines and build servers where I work as well.
I can do Get Latest, I can see in the history list of the project that there have been commits after I last did a Get Latest, I have not touched the files on disk in any way, but after the "Get Latest" function has completed, when I check the TFS tab, some of the files still says that they're not the latest version.
Obviously TFS is able to determine that I have old files locally, since the list says so. Yet, Get Latest fails to do that, get the latest version. If I do what you did, use the Get Specific version, and check the two checkboxes at the bottom of the dialog, then the files are retrieved.
We changed our build servers to always use the Get Specific version type of function instead, so this part now works, but since our build server (TeamCity) also relies on checking if there have been changes to the files in order to kick off a build, sometimes it lapses into a "nothing changed, nothing to see here, move along" mode and does nothing until we forcibly run the build configuration.
Note that I have experienced this problem on a machine that is never touched, except for get latest + build, both manually, so there's nothing tampering with the files. It's just TFS getting confused.
One time this cropped up I verified that the files on disk was indeed binary identical to the version previously retrieved, so no manual tampering had been done with the files.
Also, I fail to see how TFS can "know" whether files have changed on disk or not without actually looking at the contents. If one part of TFS can see that the files are indeed not the latest version, then the Get Latest version should absolutely be able to get the latest version. This in reference to comments to other answers here.
It might because you are login TFS as the same user, and the workspace name (based on machine name by default) is also the same, so TFS thinks your are on the same machine and same workspace, thus you already have the latest version of the files, so it wont get them for you.
try rename your machine, and create a new workspace as a new machine.
I had the same issue with Visual Studio 2012. No matter what I did, it didn't get the code from TFS source control.
In my case, the cause was mappings a folder + subfolder from the source control separately but to the same tree in my local HD.
The solution was removing the subfolder mapping using the "manage workspaces" window.
Most of the issues I've seen with developers complaining that Get Latest doesn't do what they expect stem from the fact that they're performing a Get Latest from Solution Explorer rather than from Source Control Explorer. Solution Explorer only gets the files that are part of the solution and ignores anything that may be required by files within the solution, and therefore part of source control, whereas Source Control explorer compares your local workspace against the repository on the server to determine which files are needed.
WHen I run into this problem with it not getting latest and version mismatches I first do a "Get Specific Version" set it to changeset and put in 1. This will then remove all the files from your local workspace (for that project, folder, file, etc) and it will also have TFS update so that it knows you now have NO VERSION DOWNLOADED. You can then do a "Get Latest" and viola, you will actually have the latest
It could happen when you use TFS from two different machines with the same account, if so you should compare to see changed files and check out them then get latest then undo pending changes to remove checkout
This worked for me:
1. Exit Visual Studio
2. Open a command window and navigate to the folder: "%localappdata%\Local\Microsoft\Team Foundation\"
3. Navigate to the sub folders for every version and delete the sub folder "cache" and its contents
4. Restart Visual Studio and connect to TFS.
5. Test the Get Latest Version.
just want to add TFS MSBuild does not support special characters on folders i.e. "@"
i had experienced in the past where one of our project folders named as External@Project1
we created a TFS Build definition to run a custom msbuild file then the workspace folder is not getting any contents at the External@Project1 folder during workspace get latest. It seems that tfs get is failing but does not show any error.
after some trial and error and renaming the folder to _Project1. voila we got files on the the folder (_Project1).
Tool: TFS Power Tools
Source: http://dennymichael.net/2013/03/19/tfs-scorch/
Command: tfpt scorch /recursive /deletes C:\LocationOfWorkspaceOrFolder
This will bring up a dialog box that will ask you to Delete or Download a list of files. Select or Unselect the files accordingly and press ok. Appearance in Grid (CheckBox, FileName, FileAction, FilePath)
Cause: TFS will only compare against items in the workspace. If alterations were made outside of the workspace TFS will be unaware of them.
Hopefully someone finds this useful. I found this post after deleting a handful of folders in varying locations. Not remembering which folders I deleted excluded the usual Force Get/Replace option I would have used.
In my case, Get specific version, even checking both check boxes and undoing all pending changes didn't work.
Checked the work spaces. Edit current workspace. Check all paths. The solution path was incorrect and was pointing to a deleted folder.
Fixed the path and get latest worked fine.
참고URL : https://stackoverflow.com/questions/3141525/why-doesnt-tfs-get-latest-get-the-latest
'programing' 카테고리의 다른 글
자동 레이아웃을 사용하여 UIScrollview에서 제약 조건을 설정하려면 어떻게해야합니까? (0) | 2020.05.23 |
---|---|
프로그래밍 방식으로 Segue를 수행하고 매개 변수를 대상보기로 전달 (0) | 2020.05.23 |
maven-release-plugin으로 테스트를 건너 뛰려면 어떻게해야합니까? (0) | 2020.05.21 |
Maven 관리 종속성을 위해 Eclipse에 첨부 된 소스 jar 파일 가져 오기 (0) | 2020.05.21 |
Ajax POST 요청으로 Django CSRF 검사 실패 (0) | 2020.05.21 |