开发者

TFS auto-checkout before checkin

Does a feature like "TFS auto-checkout before checkin" exist, so that I don't checkout any file until the moment I say "checkin", e.g. in case I only change files temporarily - which happens all the time.

In other words, client-side I want to work as if using subversion, regardless of what the TFS server might think. This must be possible, I just wonder if it is easy to setup.

In yet other words, until and unless I say 'checkin', other users shouldn't (be able t开发者_JAVA技巧o) bother what files I'm editing.


These answers are fine assuming you always work in Visual Studio. But imagine the scenario of editing a bunch of files outside of Visual Studio and you want to use Windows Explorer TFS powertools to automatically checkout files which were just modified. Well, there is no automatic checkout. What I ended up doing was to sort the files by the "Date Modified" column and then individual selecting the modified files only. You can't select any files which might be added, as the TFS power tool Windows extension will grey out the "Check Out for Edit.." The other frustration is that TFS power tools doesn't have a file icon to differentiate if a file is currently checkout or simply not yet added to TFS. Basically, TFS is terrible working with more than file at a time unless you are exclusively working within VS, but who does that.

SVN kicks TFS when it comes to this type of scenario.


You can tell Visual studio not to check out on edit, go to tools, options, source control, environment. Then select the behaviour you want. If you choose editing to "do nothing" and saving to "prompt for checkout" it should be pretty close to what you want.

TFS auto-checkout before checkin

You could also look at svnBridge which allows you to use TortoiseSVN with TFS. I assume that the point of svnBridge is to allow developers used to SVN to use TFS without having to change the way they work, so it should meet your needs.

A combination of both of these should get you close.


From time to time I hear from people who dislike the automatic check out behaviour common with TFS. One of the great things about TFS is the the pending changes list that shows you the files you have currently checked out and allows you to easily undo any un-intentional check outs. While I personally find the auto-checkout features a productivity boon - like most things there is a preference that you can use to adjust the default behaviour if you find it causes problems with the way you like to work.

In Visual Studio 2008 (with the Team Explorer 2008 installed), go to Tools, Options, Source Control, Environment and change the Checked-in items for Saving and Editing to "Prompt for check out" rather than the default which is "Check out automatically".

TFS auto-checkout before checkin


No. When you check in TFS will checkin those files, you have to just undo those files.

However checking out a file doesn't stop others from checking them out, unless you've locked them. This non exclusive locking is the default behaviour.


No. But you can do one thing - Open solution in 2 Visual Studio, One in which solution is Online and another in which solution is offline. Do all your changes/work on Offline solution. After completing your task.

  1. Go to first VS (Online) and checkout the files containing your changes.
  2. Go to Second VS (Offline, containing your changes) - It will prompt for file changes and click "No to All" so that all your changes persist.
  3. Press Save All.
  4. First Solution (Online) will prompt for new changes and click "Yes To All" so that all your changes done in offline mode will get in new files.
  5. Get Latest. - Any conflicting changes will be reflected (Try automerge - if you're lucky will work perfectly)
  6. CHECK-IN

Though a tedious task but a workout for your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜