Pregunta

Is there a way in Visual Studio & TFS where you can force the developers to check-in their code ? or remind them to always check-in their code ?

¿Fue útil?

Solución

There is no way you can force checkins of files in other workspaces. Files checked out are only present on the local drive where the workspace is located, so if for instance the machine is turned off, there is no way to get to the files.

But you can identify files that are checked out, and notify the users. Using tf.exe you should be able to get a list of all files checked out for all users like this:

tf status /user:*

You can limit the scope by suplying a path and /r to get all items under.

tf status /user:* $/TeamProject/Project/ /r

Otros consejos

While there is no way to force these kind of check-ins you could potentially create a new user that will have access to all the files that are checked out on other systems (assuming that those systems are running). Because TFS knows who checked out which file.

You can then copy the checked out files to a local workspace and check them in. This sounds a lot easier than it is. You will likely get a lot of merge conflicts, and when somebody gets the latest version from TFS they will also get those merge conflicts (not to mention that their own changes will be considered merge conflicts).

I believe TFS can be configured to allow only a single check out per file. This would solve a lot of problems but will limit the developers.

So in short there are solutions for this. But it would probably work better to have developers check in their own work rather than forcing it remotely with all the trouble that can come with that.

Check-in is part of a process. If you have other parts of the process in-place, then the need to check-in will become obvious, and devs will do it.

For example: If you setup an automatic build, which builds everything that's checked-in, and use that build in QA/release/etc. Then devs will have to checkin, or their code will not be in that build.

Use team foundation sidekicks to unlock files, delete workspaces. There is no way to force the developer to checkin their files.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top