TFS 2008 checks out code automatically on edit

后端 未结 7 2164
慢半拍i
慢半拍i 2021-02-09 22:10

I am working on a Visual Studio 2008 project that is already added to TFS server. I am not sure which settings and policies have been configured for the TFS (this is done by a s

7条回答
  •  执念已碎
    2021-02-09 22:57

    I think this is a feature not a problem. If you change a module and it's under source control, you are now "out of sync" with the repository. If you exit (and the default behavior is to save) - and come back later - the file is not what everyone else is seeing. This can be dangerous.

    For example: back in the days of VSS - on a Friday afternoon I had to "put out a fire" and debug a problem in, Prod Environment, so I changed the connection string in the appropriate config file. Another developer had the file checked out - so I did the usual workaround to mark the file read-only so I could save it. I figured out the problem and informed the user. This was in fire-fighting mode - so I didn't consider the fact that I now have production connection string in my dev configuration.

    Monday mornign I come in and open up the solution. Is there any feedback telling me the config file is pointing to production? No I have to remember.

    If the file is checked-out however - that icon is indicator to me that "flags" the fact that the files have been modified. I don't quite understand the "big deal" in having to right-click the solution and say "un-do pending changes"

    Or if you want to save them, as the down-voted suggestion by aleichtle.wordpress (I don't understand the down votes - I think it is an excellent suggestion) explains, you can shelve the changes. This will remove the check-out and also save the changes on the server.

    Version Control systems are a critical and important component of the software development life cycle. It is important to consider your "process". You may need to make adjustments as you use a different tool ("When in Rome"....)

    It may be difficult to make the adjustment - but there are often good reasons the tool works the way it does.

提交回复
热议问题